From 64e3a81873717e54d5c82ad9da6bc1bc00de9f8b Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Sun, 2 Nov 2025 18:50:09 +0100 Subject: use wss:// when connecting through HTTPS --- .radicle/native.yaml | 2 +- lambda-calcul/haskell/public/repl.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.radicle/native.yaml b/.radicle/native.yaml index 3b6344f..882bc71 100644 --- a/.radicle/native.yaml +++ b/.radicle/native.yaml @@ -25,6 +25,6 @@ shell: | [[ -f ${HOME}/.config/lambda ]] && rm ${HOME}/.config/lambda cp "$EXE" ${HOME}/.local/bin/ - cp -fr public "${HOME}/.config/lambda" + cp -fr public "${HOME}/.config/lambda/" sudo systemctl restart lambda fi 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; })(); -- cgit v1.3.1