mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
Fix websocket connection behind HTTPS reverse proxy (#418)
This commit is contained in:
@@ -14,7 +14,7 @@ export const RUNTIME = ['runtimeStore'];
|
|||||||
|
|
||||||
export const serverPort = import.meta.env.DEV ? STATIC_PORT : window.location.port;
|
export const serverPort = import.meta.env.DEV ? STATIC_PORT : window.location.port;
|
||||||
export const serverURL = import.meta.env.DEV ? `http://localhost:${serverPort}` : window.location.origin;
|
export const serverURL = import.meta.env.DEV ? `http://localhost:${serverPort}` : window.location.origin;
|
||||||
export const websocketUrl = `ws://${window.location.hostname}:${serverPort}/ws`;
|
export const websocketUrl = `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${serverPort}/ws`;
|
||||||
|
|
||||||
export const eventURL = `${serverURL}/eventdata`;
|
export const eventURL = `${serverURL}/eventdata`;
|
||||||
export const rundownURL = `${serverURL}/events`;
|
export const rundownURL = `${serverURL}/events`;
|
||||||
|
|||||||
Reference in New Issue
Block a user