mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-21 20:16:28 +01:00
Update ingress.conf
This commit is contained in:
@@ -9,8 +9,8 @@ server
|
||||
location /
|
||||
{
|
||||
# Security
|
||||
allow 172.30.32.2;
|
||||
deny all;
|
||||
allow 172.30.32.2;
|
||||
deny all;
|
||||
|
||||
# Base
|
||||
proxy_bind $server_addr;
|
||||
@@ -24,6 +24,11 @@ server
|
||||
proxy_set_header X-Script-Name %%ingress_entry%%; # IMPORTANT: path has NO trailing slash
|
||||
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
|
||||
if ($http_referer ~* "^(http[s]?)://([^:]+):(\d*)(/.*)$")
|
||||
{
|
||||
@@ -37,9 +42,9 @@ server
|
||||
set $x_host $2;
|
||||
set $x_port "";
|
||||
}
|
||||
proxy_set_header X-Scheme $x_scheme;
|
||||
proxy_redirect http://$host/ $x_scheme://$x_host$x_port/;
|
||||
proxy_redirect $x_scheme://$host/ $x_scheme://$x_host$x_port/;
|
||||
proxy_set_header X-Scheme $x_scheme;
|
||||
proxy_redirect http://$host/ $x_scheme://$x_host$x_port/;
|
||||
proxy_redirect $x_scheme://$host/ $x_scheme://$x_host$x_port/;
|
||||
|
||||
# Rewrite url
|
||||
sub_filter_once off;
|
||||
@@ -49,11 +54,6 @@ server
|
||||
#sub_filter "/view" "%%ingress_entry%%/view";
|
||||
#sub_filter "/search" "%%ingress_entry%%/search";
|
||||
#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
|
||||
#proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user