Add nginx sub_filter to fix resources from /dist with HA ingress

This commit is contained in:
Patrick Decat 2021-02-08 18:48:34 +01:00
parent c6afe56884
commit af5370a90e
No known key found for this signature in database
GPG Key ID: FD55B9BD5687D8FF

View File

@ -124,6 +124,7 @@ http {
sub_filter 'href="/' 'href="$http_x_ingress_path/'; sub_filter 'href="/' 'href="$http_x_ingress_path/';
sub_filter 'url(/' 'url($http_x_ingress_path/'; sub_filter 'url(/' 'url($http_x_ingress_path/';
sub_filter '"/dist/' '"$http_x_ingress_path/dist/';
sub_filter '"/js/' '"$http_x_ingress_path/js/'; sub_filter '"/js/' '"$http_x_ingress_path/js/';
sub_filter '<body>' '<body><script>window.baseUrl="$http_x_ingress_path";</script>'; sub_filter '<body>' '<body><script>window.baseUrl="$http_x_ingress_path";</script>';
sub_filter_types text/css application/javascript; sub_filter_types text/css application/javascript;