From 507ec13848f450c46ae68ece668e41329192527e Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 19 Jan 2021 19:58:17 -0600 Subject: [PATCH] first pass at subfilter for ingress support --- nginx/nginx.conf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b757cf602..0a03e718b 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -106,8 +106,14 @@ http { } location / { - root /opt/frigate/web; - try_files $uri $uri/ /index.html; + sub_filter 'href="/' 'href="$http_x_ingress_path/'; + sub_filter 'url(/' 'url($http_x_ingress_path/'; + sub_filter '"/js/' '"$http_x_ingress_path/js/'; + sub_filter '' ''; + sub_filter_types text/css application/javascript; + sub_filter_once off; + root /opt/frigate/web; + try_files $uri $uri/ /index.html; } } }