... https: { key: require("fs").readFileSync('/privkey.pem'), cert: require("fs").readFileSync('/cert.pem') }, ... requireHttps: true, ... webSocketNodeVerifyClient: function(info) { return (info.origin == "https://www.example.de" && info.secure == true); },