diff --git a/web/src/common/constants.js b/web/src/common/constants.js index 7c151b5..2d8289f 100644 --- a/web/src/common/constants.js +++ b/web/src/common/constants.js @@ -1,19 +1,19 @@ // prod -// let wsPrefix; -// if (window.location.protocol === 'https:') { -// wsPrefix = 'wss:' -// } else { -// wsPrefix = 'ws:' -// } -// -// export const server = ''; -// export const wsServer = wsPrefix + window.location.host; -// export const prefix = window.location.protocol + '//' + window.location.host; +let wsPrefix; +if (window.location.protocol === 'https:') { + wsPrefix = 'wss:' +} else { + wsPrefix = 'ws:' +} + +export const server = ''; +export const wsServer = wsPrefix + window.location.host; +export const prefix = window.location.protocol + '//' + window.location.host; // dev -export const server = '//127.0.0.1:8088'; -export const wsServer = 'ws://127.0.0.1:8088'; -export const prefix = ''; +// export const server = '//127.0.0.1:8088'; +// export const wsServer = 'ws://127.0.0.1:8088'; +// export const prefix = ''; export const PROTOCOL_COLORS = { 'rdp': 'red',