mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-09 00:55:58 +02:00
Update ingress.conf
This commit is contained in:
@@ -13,15 +13,13 @@ server {
|
|||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Host $http_host; # try $host instead if this doesn't work
|
proxy_set_header Host $http_host; # try $host instead if this doesn't work
|
||||||
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
#proxy_set_header X-Forwarded-Host $http_host;
|
|
||||||
|
|
||||||
# Allow ingress subpath
|
# Allow ingress subpath
|
||||||
proxy_set_header X-Script-Name %%ingress_entry%%;
|
proxy_set_header X-Script-Name %%ingress_entry%%;
|
||||||
proxy_cookie_path / %%ingress_entry%%/;
|
proxy_cookie_path / %%ingress_entry%%/;
|
||||||
|
|
||||||
# Allow frames
|
# Allow frames
|
||||||
#proxy_hide_header "Content-Security-Policy";
|
proxy_hide_header "Content-Security-Policy";
|
||||||
add_header X-Frame-Options SAMEORIGIN;
|
add_header X-Frame-Options SAMEORIGIN;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
proxy_set_header Accept-Encoding "";
|
proxy_set_header Accept-Encoding "";
|
||||||
@@ -45,17 +43,13 @@ server {
|
|||||||
# Correct url without port when using https
|
# Correct url without port when using https
|
||||||
sub_filter_once off;
|
sub_filter_once off;
|
||||||
sub_filter_types *;
|
sub_filter_types *;
|
||||||
|
sub_filter https://$host/ $x_scheme://$host$x_port/;
|
||||||
sub_filter http://$host/ $x_scheme://$host$x_port/;
|
sub_filter http://$host/ $x_scheme://$host$x_port/;
|
||||||
sub_filter http://$host$x_port/ $x_scheme://$host$x_port/;
|
|
||||||
#sub_filter http://$host/ http://$host$x_port/;
|
|
||||||
sub_filter https://$host/ https://$host$x_port/;
|
|
||||||
#proxy_redirect default;
|
|
||||||
#proxy_redirect http://$host/ $x_scheme://$host$x_port/;
|
|
||||||
#proxy_redirect https://$host/ https://$host$x_port/;
|
|
||||||
#proxy_redirect http://$host$x_port/ $x_scheme://$host$x_port/;
|
|
||||||
|
|
||||||
# Rewrite url
|
# Rewrite url
|
||||||
sub_filter "/media/" "%%ingress_entry%%/media/";
|
sub_filter "/static" "$x_scheme://$host$x_port%%ingress_entry%%/static";
|
||||||
sub_filter "/static/" "%%ingress_entry%%/static/";
|
sub_filter "/media" "$x_scheme://$host$x_port%%ingress_entry%%/media";
|
||||||
|
sub_filter "$x_scheme://$host$x_port/static" "$x_scheme://$host$x_port%%ingress_entry%%/static";
|
||||||
|
sub_filter "$x_scheme://$host$x_port/media" "$x_scheme://$host$x_port%%ingress_entry%%/media";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user