From 3fb362b53601b953b862dc4f3a456bd258f739f0 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Jan 2026 15:49:18 +0200 Subject: [PATCH] Fix terminal ingress proxy (/terminal redirect + ws); bump 0.4.5 --- moltbot_assistant/config.yaml | 2 +- moltbot_assistant/nginx.conf.tpl | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/moltbot_assistant/config.yaml b/moltbot_assistant/config.yaml index 77df868..5904613 100644 --- a/moltbot_assistant/config.yaml +++ b/moltbot_assistant/config.yaml @@ -1,5 +1,5 @@ name: Moltbot Assistant -version: "0.4.4" +version: "0.4.5" slug: moltbot_assistant description: Run Moltbot Assistant (Clawdbot-compatible) as a Home Assistant add-on. url: https://github.com/techartdev/MoltBotHomeAssistant diff --git a/moltbot_assistant/nginx.conf.tpl b/moltbot_assistant/nginx.conf.tpl index b752cfe..e23b541 100644 --- a/moltbot_assistant/nginx.conf.tpl +++ b/moltbot_assistant/nginx.conf.tpl @@ -22,8 +22,16 @@ http { listen 8099; # Web terminal (ttyd) - location /terminal/ { - proxy_pass http://127.0.0.1:7681/; + # ttyd base-path is configured as /terminal (no trailing slash). + # Some clients will hit /terminal first, so redirect to /terminal/. + location = /terminal { + return 302 /terminal/; + } + + # Proxy everything under /terminal/ (including websocket /terminal/ws) + location ^~ /terminal/ { + # IMPORTANT: no trailing slash in proxy_pass so nginx preserves the full URI + proxy_pass http://127.0.0.1:7681; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -31,6 +39,8 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; } # Landing page (shown inside HA Ingress)