diff --git a/helm-chart/templates/11-nginx-config-map.yaml b/helm-chart/templates/11-nginx-config-map.yaml index 7c2edfe54..818f1ebc0 100644 --- a/helm-chart/templates/11-nginx-config-map.yaml +++ b/helm-chart/templates/11-nginx-config-map.yaml @@ -20,8 +20,8 @@ data: client_header_buffer_size 32k; large_client_header_buffers 8 64k; - location {{ default "" (((.Values.tap).routing).front).basePath }}/api { - rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/api(.*)$ $1 break; + location ~ ^(/.+)?/api { + rewrite ^(/.+)?/api(.*)$ $2 break; proxy_pass http://kubeshark-hub; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; @@ -35,8 +35,8 @@ data: proxy_pass_request_headers on; } - location {{ default "" (((.Values.tap).routing).front).basePath }}/saml { - rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/saml(.*)$ /saml$1 break; + location ~ ^(/.+)?/saml { + rewrite ^(/.+)?/saml(.*)$ /saml$2 break; proxy_pass http://kubeshark-hub; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host;