From 6b113c1f3e12b724a0a3cfff06e45e3abf36f058 Mon Sep 17 00:00:00 2001 From: sl-jetson Date: Sat, 4 Apr 2026 11:59:36 -0400 Subject: [PATCH] feat: auto-detect wss:// for rosbridge when page served over HTTPS (Issue #681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Default URL auto-selects wss://saul-t-mote.evthings.app/rosbridge when page is loaded via https://, falls back to ws://100.64.0.2:9090 for local/Tailscale access - Clears hardcoded ws:// value from input; JS sets it from localStorage or the detected default on first load Companion: nginx config on Orin adds /rosbridge WebSocket reverse proxy on port 8080 → ws://127.0.0.1:9090 Co-Authored-By: Claude Sonnet 4.6 --- ui/saul-tee-tracker.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/saul-tee-tracker.html b/ui/saul-tee-tracker.html index 294183a..dcf7661 100644 --- a/ui/saul-tee-tracker.html +++ b/ui/saul-tee-tracker.html @@ -227,7 +227,7 @@ body {
- + Not connected
@@ -732,7 +732,10 @@ map.on('dragstart', () => { // ── Init ────────────────────────────────────────────────────────────────────── (function init() { - const saved = localStorage.getItem('saul_tee_ws_url') || 'ws://100.64.0.2:9090'; + const defaultUrl = location.protocol === 'https:' + ? 'wss://saul-t-mote.evthings.app/rosbridge' + : 'ws://100.64.0.2:9090'; + const saved = localStorage.getItem('saul_tee_ws_url') || defaultUrl; $('ws-input').value = saved; drawCompass(null); connectRos(saved);