From eedd129a54a29ca498c4b864d22b9869d6bcfc31 Mon Sep 17 00:00:00 2001 From: tiptophelmet Date: Mon, 24 Mar 2025 21:05:27 +0200 Subject: [PATCH] :wrench: Use regex-based `api,saml` locations without base path --- helm-chart/templates/11-nginx-config-map.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;