summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/public
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 18:50:09 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-02 18:50:09 +0100
commit64e3a81873717e54d5c82ad9da6bc1bc00de9f8b (patch)
treee357a34f36b53150f6c74ad554869ab32597ea40 /lambda-calcul/haskell/public
parentc815bcb8a2a6ef3d1819d27ca506955dcf306532 (diff)
downloadlambda-nantes-64e3a81873717e54d5c82ad9da6bc1bc00de9f8b.tar.gz
use wss:// when connecting through HTTPS
Diffstat (limited to 'lambda-calcul/haskell/public')
-rw-r--r--lambda-calcul/haskell/public/repl.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lambda-calcul/haskell/public/repl.js b/lambda-calcul/haskell/public/repl.js
index 12ce03a..8dab744 100644
--- a/lambda-calcul/haskell/public/repl.js
+++ b/lambda-calcul/haskell/public/repl.js
@@ -3,7 +3,8 @@ var websocket = undefined;
function connect() {
websocket = (function() {
const host = window.location.host;
- const ws = new WebSocket("ws://" + host + "/repl/1235");
+ const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
+ const ws = new WebSocket(protocol + "://" + host + "/repl/1235");
ws.binaryType = "arraybuffer";
return ws;
})();