mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-14 19:38:04 +02:00
fix(seerr): remove rewrite rule and fix Connection header to preserve URL encoding
Remove the nginx rewrite directive that could cause URL normalization/re-encoding issues with special characters in query strings (like spaces encoded as +). HA Supervisor strips the ingress prefix before forwarding, making the rewrite unnecessary. Without it, proxy_pass uses the raw $request_uri which preserves URL encoding. Also fix Connection header from hardcoded "upgrade" to $connection_upgrade map variable for proper WebSocket vs regular HTTP request handling. Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/3982b002-dfcb-4eb5-98c2-913f665b6a07 Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ecc259dd50
commit
7bc9a34715
@@ -11,12 +11,14 @@ server {
|
||||
location ^~ / {
|
||||
set $app '%%ingress_entry%%';
|
||||
|
||||
rewrite ^%%ingress_entry%%/?(.*)$ /$1 break;
|
||||
# HA Supervisor strips the ingress entry prefix, so no rewrite is needed.
|
||||
# Avoiding rewrite ensures proxy_pass uses the raw $request_uri,
|
||||
# which preserves URL encoding (e.g. spaces as + in query strings).
|
||||
proxy_pass http://127.0.0.1:5055;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
|
||||
proxy_hide_header X-Powered-By;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user