We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 370070b commit b8aa45eCopy full SHA for b8aa45e
1 file changed
chat/js/client.js
@@ -1,6 +1,6 @@
1
Class.Define('Chat', {
2
Static: {
3
- ADDRESS: 'ws://%location.host%%location.pathname%data/'
+ ADDRESS: '%websocket.protocol%//%location.host%%location.pathname%data/'
4
},
5
Constructor: function () {
6
this._initElements();
@@ -110,6 +110,7 @@ Class.Define('Chat', {
110
// connect to server:
111
this._socket = SocketWrapper.getInstance(
112
this.self.ADDRESS
113
+ .replace('%websocket.protocol%', location.protocol === 'https:' ? 'wss:' : 'ws:')
114
.replace('%location.host%', location.host)
115
.replace('%location.pathname%', location.pathname)
116
);
0 commit comments