mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Feat: Add SSL support for webserver + websocket (#612)
* Feat: Add SSL support for webserver + websocket Finally, Hyperion reaches the SSL century! - Uses by default a internal key and certificate to provide working HTTPS out-of-the-box - Your browser won't like that, for a green ssl seal next to the browser address bar you need to use Let's Encrypt with a own legit domain. This is out of the scope of Hyperion
This commit is contained in:
@@ -74,7 +74,7 @@ function initWebSocket()
|
||||
if (window.websocket == null)
|
||||
{
|
||||
window.jsonPort = (document.location.port == '') ? '80' : document.location.port;
|
||||
window.websocket = new WebSocket('ws://'+document.location.hostname+":"+window.jsonPort);
|
||||
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) {
|
||||
$(window.hyperion).trigger({type:"open"});
|
||||
|
Reference in New Issue
Block a user