Fix nginx webmanifest sub_filter

This commit is contained in:
leccelecce 2025-03-20 22:08:54 +00:00
parent 060659044e
commit d7e6118fa6

View File

@ -41,6 +41,11 @@ http {
default 1; default 1;
} }
map $http_x_ingress_path $ingress_path_filter {
"~*^.+" $http_x_ingress_path;
default "/";
}
upstream frigate_api { upstream frigate_api {
server 127.0.0.1:5001; server 127.0.0.1:5001;
keepalive 1024; keepalive 1024;
@ -313,8 +318,10 @@ http {
proxy_set_header Accept-Encoding ""; proxy_set_header Accept-Encoding "";
sub_filter_once off; sub_filter_once off;
sub_filter_types application/json; sub_filter_types application/json;
sub_filter '"start_url": "/"' '"start_url" : "$http_x_ingress_path"'; sub_filter '"start_url": "/"' '"start_url" : "$ingress_path_filter"';
sub_filter '"src": "/' '"src": "$http_x_ingress_path/'; sub_filter '"src": "/' '"src": "$ingress_path_filter';
} }
sub_filter 'href="/BASE_PATH/' 'href="$http_x_ingress_path/'; sub_filter 'href="/BASE_PATH/' 'href="$http_x_ingress_path/';