using the host from the document.location
This commit is contained in:
parent
126a3d585b
commit
4cf040a866
@ -3,14 +3,16 @@ const WEBSOCKET = function (model) {
|
||||
const useUrl = 0;
|
||||
let wsUrl = ['localhost', 'silvrtree.co.uk'];
|
||||
const wsPort = '3010';
|
||||
|
||||
console.log(document.location);
|
||||
if ('https:' === document.location.protocol) {
|
||||
wsUrl = 'wss://' + wsUrl[useUrl] + '';
|
||||
// wsUrl = 'wss://' + wsUrl[useUrl] + '';
|
||||
wsUrl = 'wss://' + document.location.host ;
|
||||
// wsPort = '';
|
||||
} else {
|
||||
//wsUrl = 'ws://localhost:3001';
|
||||
wsUrl = 'ws://' + wsUrl[useUrl] + '';
|
||||
// wsUrl = 'ws://' + wsUrl[useUrl] + '';
|
||||
// wsPort = '';
|
||||
wsUrl = 'ws://' + document.location.host ;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user