fix: correct WebSocket URL scheme for HTTPS to use wss instead of ws
This commit is contained in:
parent
d88961c906
commit
fc23ce2fca
@ -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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user