Migration to v5.0

https://github.com/alexbelgium/hassio-addons/issues/416
This commit is contained in:
Alexandre
2022-08-26 19:55:26 +02:00
parent 73159492ce
commit e4e7a6ee8d
24 changed files with 262 additions and 261 deletions

View File

@@ -1,4 +1,3 @@
root /dev/null;
server_name $hostname;
add_header X-Content-Type-Options nosniff;

View File

@@ -6,16 +6,34 @@ server {
client_max_body_size 0;
location / {
root /opt/scrutiny/web;
if ($http_referer ~* "^(http[s]?)://([^:]+):(\d*)(/.*)$") {
set $x_scheme $1;
set $x_host $2;
set $x_port $3;
}
if ($http_referer ~* "^(http[s]?)://([^:]+)(/.*)$") {
set $x_scheme $1;
set $x_host $2;
set $x_port "";
}
location = / {
return 301 $x_scheme://$host:$x_port%%ingress_entry%%/web/dashboard;
}
location /api {
add_header Access-Control-Allow-Origin *;
proxy_read_timeout 30;
proxy_pass http://backend/api;
}
location /web/ {
add_header Access-Control-Allow-Origin *;
proxy_read_timeout 30;
proxy_pass http://backend/web/;
}
location /api/ {
add_header Access-Control-Allow-Origin *;
proxy_read_timeout 30;
proxy_pass http://backend/api/;
}
}