Update sub_filter

This commit is contained in:
Alexandre
2022-09-22 11:50:03 +02:00
committed by GitHub
parent e60aded38a
commit 0bc5e03709

View File

@@ -19,7 +19,7 @@ server {
# Allow frames
proxy_hide_header "Content-Security-Policy";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Frame-Options SAMEORIGIN; # Required for ingress frame
add_header Access-Control-Allow-Origin *;
proxy_set_header Accept-Encoding "";
@@ -41,7 +41,7 @@ server {
proxy_set_header X-Port $x_port;
proxy_set_header X-Forwarded-Proto $x_scheme;
proxy_set_header Host $host$x_port; # try $host instead if this doesn't work
proxy_set_header Host $host$x_port; # Required for addresses without ports
# Correct url without port when using https
sub_filter_once off;
@@ -50,7 +50,7 @@ server {
sub_filter http://$x_host/ http://$x_host$x_port/;
# Rewrite url
sub_filter "/static" "%%ingress_entry%%/static";
sub_filter "/media" "%%ingress_entry%%/media";
sub_filter "/static/" "%%ingress_entry%%/static/";
sub_filter "/media/" "%%ingress_entry%%/media/";
}
}