1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00

Make WS path in lighttpd mode configurable

This commit is contained in:
Stepan Henek 2022-03-23 10:15:00 +01:00
parent 1bb8abd633
commit cc1b0b3f81
No known key found for this signature in database
GPG Key ID: 08081019647EB8F2

View File

@ -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. * This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information. * See /LICENSE for more information.
@ -10,8 +10,10 @@
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss"; const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
const URL = process.env.LIGHTTPD const URL = process.env.LIGHTTPD
? `${PROTOCOL}://${window.location.host}/foris-ws` ? `${PROTOCOL}://${window.location.host}/${
: `${PROTOCOL}://${window.location.hostname}:${9081}`; process.env.WSPATH || "foris-ws"
}`
: `${PROTOCOL}://${window.location.hostname}:9081`;
const WAITING_FOR_CONNECTION_TIMEOUT = 500; const WAITING_FOR_CONNECTION_TIMEOUT = 500;