mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Working ingress
This commit is contained in:
@@ -12,8 +12,7 @@ server {
|
||||
proxy_read_timeout 30;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $http_host; # try $host instead if this doesn't work
|
||||
|
||||
|
||||
# Allow ingress subpath
|
||||
proxy_set_header X-Script-Name %%ingress_entry%%;
|
||||
proxy_cookie_path / %%ingress_entry%%/;
|
||||
@@ -38,13 +37,17 @@ server {
|
||||
set $x_port "";
|
||||
}
|
||||
proxy_set_header X-Scheme $x_scheme;
|
||||
proxy_set_header X-Host $x_host;
|
||||
proxy_set_header X-Port $x_port;
|
||||
proxy_set_header X-Forwarded-Proto $x_scheme;
|
||||
|
||||
proxy_set_header Host $x_host$x_port; # try $host instead if this doesn't work
|
||||
|
||||
# Correct url without port when using https
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter https://$host/ $x_scheme://$host$x_port/;
|
||||
sub_filter http://$host/ $x_scheme://$host$x_port/;
|
||||
sub_filter https://$x_host/ https://$x_host$x_port/;
|
||||
sub_filter http://$x_host/ http://$x_host$x_port/;
|
||||
|
||||
# Rewrite url
|
||||
sub_filter "/static" "%%ingress_entry%%/static";
|
||||
|
||||
Reference in New Issue
Block a user