Fix websocket connection behind HTTPS reverse proxy (#418)

This commit is contained in:
Marks Polakovs
2023-05-28 17:18:47 +01:00
committed by GitHub
parent 8abf6aee70
commit f6e524e865
+1 -1
View File
@@ -14,7 +14,7 @@ export const RUNTIME = ['runtimeStore'];
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 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 rundownURL = `${serverURL}/events`;