Fix ingress: redirect to include token; fix ttyd base path; bump 0.3.2

This commit is contained in:
root
2026-01-29 18:28:58 +02:00
parent c21dead149
commit 1b120c277c
2 changed files with 16 additions and 14 deletions
+11 -10
View File
@@ -16,12 +16,6 @@ http {
sendfile on;
keepalive_timeout 65;
# Inject gateway token server-side. Token is substituted into this template at runtime.
map $args $args_with_token {
"" "token=__GATEWAY_TOKEN__";
default "$args&token=__GATEWAY_TOKEN__";
}
server {
listen 8099;
@@ -32,18 +26,25 @@ http {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Everything else -> Clawdbot gateway UI (websocket capable)
# Gateway UI
# Ensure the browser URL includes token=... (Clawdbot UI expects it client-side).
location / {
proxy_pass http://127.0.0.1:18789$uri?$args_with_token;
if ($arg_token = "") {
return 302 $scheme://$host$request_uri?token=__GATEWAY_TOKEN__;
}
proxy_pass http://127.0.0.1:18789;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}