Update ingress.conf

This commit is contained in:
Alexandre
2022-08-27 23:47:18 +02:00
committed by GitHub
parent bd2beeaa8c
commit 86dc527515

View File

@@ -18,12 +18,6 @@ server {
proxy_set_header X-Script-Name %%ingress_entry%%;
proxy_cookie_path / %%ingress_entry%%/;
# Rewrite url
sub_filter_once off;
sub_filter_types *;
sub_filter "/static" "%%ingress_entry%%/static";
sub_filter "/media" "%%ingress_entry%%/media";
# Allow frames
proxy_hide_header "Content-Security-Policy";
add_header X-Frame-Options SAMEORIGIN;
@@ -47,7 +41,13 @@ server {
proxy_set_header X-Forwarded-Proto $x_scheme;
# 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/;
# Rewrite url
sub_filter "/static" "$x_scheme://$host$x_port%%ingress_entry%%/static";
sub_filter "/media" "$x_scheme://$host$x_port%%ingress_entry%%/media";
}
}