From cc1b0b3f81193eee53e4d91428f9df7e01302619 Mon Sep 17 00:00:00 2001 From: Stepan Henek Date: Wed, 23 Mar 2022 10:15:00 +0100 Subject: [PATCH] Make WS path in lighttpd mode configurable --- src/webSockets/WebSockets.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/webSockets/WebSockets.js b/src/webSockets/WebSockets.js index a89ffa9..1bddfd1 100644 --- a/src/webSockets/WebSockets.js +++ b/src/webSockets/WebSockets.js @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 CZ.NIC z.s.p.o. (http://www.nic.cz/) + * Copyright (C) 2020-2022 CZ.NIC z.s.p.o. (http://www.nic.cz/) * * This is free software, licensed under the GNU General Public License v3. * See /LICENSE for more information. @@ -10,8 +10,10 @@ const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss"; const URL = process.env.LIGHTTPD - ? `${PROTOCOL}://${window.location.host}/foris-ws` - : `${PROTOCOL}://${window.location.hostname}:${9081}`; + ? `${PROTOCOL}://${window.location.host}/${ + process.env.WSPATH || "foris-ws" + }` + : `${PROTOCOL}://${window.location.hostname}:9081`; const WAITING_FOR_CONNECTION_TIMEOUT = 500;