Use correct WebSocket protocol (wss) based on current page protocol
This commit is contained in:
committed by
Aditya Chandel
parent
51cada36fc
commit
cf499fdc08
@@ -1,7 +1,10 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
API_CONFIG: {
|
API_CONFIG: {
|
||||||
BASE_URL: `${window.location.protocol}//${window.location.hostname}:${window.location.port}`,
|
BASE_URL: window.location.origin,
|
||||||
BROKER_URL: `ws://${window.location.hostname}:${window.location.port}/ws`,
|
BROKER_URL:
|
||||||
|
window.location.protocol === 'https:'
|
||||||
|
? `wss://${window.location.host}/ws`
|
||||||
|
: `ws://${window.location.host}/ws`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user