mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fix(webui): works now with https port 443 (#924)
* Websocket fix for SSL reverse proxies * docs: add changelog Co-authored-by: Sersch <edeltraud70@gmx.de>
This commit is contained in:
@@ -76,7 +76,13 @@ function initWebSocket()
|
||||
{
|
||||
if (window.websocket == null)
|
||||
{
|
||||
window.jsonPort = (document.location.port == '') ? '80' : document.location.port;
|
||||
window.jsonPort = '';
|
||||
if(document.location.port == '' && document.location.protocol == "http:")
|
||||
window.jsonPort = '80';
|
||||
else if (document.location.port == '' && document.location.protocol == "https:")
|
||||
window.jsonPort = '443';
|
||||
else
|
||||
window.jsonPort = document.location.port;
|
||||
window.websocket = (document.location.protocol == "https:") ? new WebSocket('wss://'+document.location.hostname+":"+window.jsonPort) : new WebSocket('ws://'+document.location.hostname+":"+window.jsonPort);
|
||||
|
||||
window.websocket.onopen = function (event) {
|
||||
|
Reference in New Issue
Block a user