mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02: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:
parent
94c23653de
commit
d1a2b77ce3
@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
||||
- webui: Works now with https port 443 (#923 with #924)
|
||||
### Removed
|
||||
|
||||
## [2.0.0-alpha.7](https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.0-alpha.7) - 2020-07-23
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user