fix: correct WebSocket URL scheme for HTTPS to use wss instead of ws

This commit is contained in:
retoor 2024-11-27 14:56:34 +00:00
parent d88961c906
commit fc23ce2fca

View File

@ -139,7 +139,7 @@ index_html = """
}
document.addEventListener("DOMContentLoaded", () => {
let url = (window.location.protocol == 'http' ? 'ws://': 'ws:///') + window.location.host + "/ws"
let url = (window.location.protocol == 'http' ? 'ws://': 'wss://') + window.location.host + "/ws"
const ws = new WebSocket(url);
const messagesDiv = document.getElementById("messages");
ws.onmessage = (event) => {