Update ingress.conf

This commit is contained in:
Alexandre
2022-06-30 12:09:45 +02:00
committed by GitHub
parent 2771fd4eec
commit 6f61cc8c35

View File

@@ -9,8 +9,8 @@ server
location / location /
{ {
# Security # Security
allow 172.30.32.2; allow 172.30.32.2;
deny all; deny all;
# Base # Base
proxy_bind $server_addr; proxy_bind $server_addr;
@@ -24,6 +24,11 @@ server
proxy_set_header X-Script-Name %%ingress_entry%%; # IMPORTANT: path has NO trailing slash proxy_set_header X-Script-Name %%ingress_entry%%; # IMPORTANT: path has NO trailing slash
proxy_cookie_path / %%ingress_entry%%/; proxy_cookie_path / %%ingress_entry%%/;
# Allow iframe
proxy_hide_header X-Frame-Options;
add_header Access-Control-Allow-Origin *;
proxy_set_header Accept-Encoding "";
# Avoid mixed contents # Avoid mixed contents
if ($http_referer ~* "^(http[s]?)://([^:]+):(\d*)(/.*)$") if ($http_referer ~* "^(http[s]?)://([^:]+):(\d*)(/.*)$")
{ {
@@ -37,9 +42,9 @@ server
set $x_host $2; set $x_host $2;
set $x_port ""; set $x_port "";
} }
proxy_set_header X-Scheme $x_scheme; proxy_set_header X-Scheme $x_scheme;
proxy_redirect http://$host/ $x_scheme://$x_host$x_port/; proxy_redirect http://$host/ $x_scheme://$x_host$x_port/;
proxy_redirect $x_scheme://$host/ $x_scheme://$x_host$x_port/; proxy_redirect $x_scheme://$host/ $x_scheme://$x_host$x_port/;
# Rewrite url # Rewrite url
sub_filter_once off; sub_filter_once off;
@@ -49,11 +54,6 @@ server
#sub_filter "/view" "%%ingress_entry%%/view"; #sub_filter "/view" "%%ingress_entry%%/view";
#sub_filter "/search" "%%ingress_entry%%/search"; #sub_filter "/search" "%%ingress_entry%%/search";
#sub_filter "/edit/" "%%ingress_entry%%/edit/"; #sub_filter "/edit/" "%%ingress_entry%%/edit/";
# Allow iframe
proxy_hide_header X-Frame-Options;
add_header Access-Control-Allow-Origin *;
proxy_set_header Accept-Encoding "";
# Tests # Tests
#proxy_set_header X-Real-IP $remote_addr; #proxy_set_header X-Real-IP $remote_addr;