Ingress: revert X-Ingress-Path redirect; use relative ./?token for trailing slash; bump 0.4.0

This commit is contained in:
root
2026-01-30 02:20:21 +02:00
parent 298a00d5af
commit 8a88ffd3c4
2 changed files with 5 additions and 10 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: Moltbot Assistant
version: "0.3.9"
version: "0.4.0"
slug: moltbot_assistant
description: Run Moltbot Assistant (Clawdbot-compatible) as a Home Assistant add-on.
url: https://github.com/techartdev/ClawdHAAddOn
+4 -9
View File
@@ -16,14 +16,7 @@ http {
sendfile on;
keepalive_timeout 65;
# Home Assistant Ingress may pass the original ingress path in X-Ingress-Path.
# If present, use it to build a redirect that keeps the browser under ingress
# and ensures a trailing slash before the query string.
map $http_x_ingress_path $token_redirect {
default "?token=__GATEWAY_TOKEN__";
"" "?token=__GATEWAY_TOKEN__";
~.+ "$http_x_ingress_path/?token=__GATEWAY_TOKEN__";
}
# Ingress note: keep redirects relative so we stay under HA Ingress.
server {
listen 8099;
@@ -53,7 +46,9 @@ http {
# path via X-Ingress-Path; if present, redirect to that path with a trailing slash.
location = / {
if ($arg_token = "") {
return 302 $token_redirect;
# Force a trailing slash via a relative redirect.
# This avoids absolute /hassio/... redirects that can confuse HA ingress routing.
return 302 ./?token=__GATEWAY_TOKEN__;
}
proxy_pass http://127.0.0.1:18789;