Skip to content

Commit 6003725

Browse files
authored
Use WSS protocol when accessing LiveServer via HTTPS (#118)
1 parent 95c2160 commit 6003725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- browser-reload script, automatically added by the LiveServer.jl -->
22
<script>
3-
var ws_liveserver_M3sp9 = new WebSocket("ws://" + location.host + location.pathname);
3+
var ws_liveserver_M3sp9 = new WebSocket((location.protocol=="https:" ? "wss:" : "ws:") + "//" + location.host + location.pathname);
44
ws_liveserver_M3sp9.onmessage = function(msg) {
55
if (msg.data === "update") {
66
ws_liveserver_M3sp9.close();

0 commit comments

Comments
 (0)