Поправки для поддержки reverse-proxy, рефакторинг
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import WebSocketConnection from '../../../server/core/WebSocketConnection';
|
||||
|
||||
export default new WebSocketConnection();
|
||||
const protocol = (window.location.protocol == 'https:' ? 'wss:' : 'ws:');
|
||||
let url = `${protocol}//${window.location.host}${window.location.pathname}`;
|
||||
url += (url[url.length - 1] === '/' ? 'ws' : '/ws');
|
||||
|
||||
export default new WebSocketConnection(url);
|
||||
Reference in New Issue
Block a user