mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-07-06 04:48:40 +00:00
🔨 Use tap.routing.front.basePath
to adjust nginx blocks
This commit is contained in:
parent
43d8853dd8
commit
3f81a8181b
@ -20,8 +20,8 @@ data:
|
|||||||
client_header_buffer_size 32k;
|
client_header_buffer_size 32k;
|
||||||
large_client_header_buffers 8 64k;
|
large_client_header_buffers 8 64k;
|
||||||
|
|
||||||
location /api {
|
location {{ default "" (((.Values.tap).routing).front).basePath }}/api {
|
||||||
rewrite ^/api(.*)$ $1 break;
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/api(.*)$ $1 break;
|
||||||
proxy_pass http://kubeshark-hub;
|
proxy_pass http://kubeshark-hub;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
@ -35,8 +35,8 @@ data:
|
|||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /saml {
|
location {{ default "" (((.Values.tap).routing).front).basePath }}/saml {
|
||||||
rewrite ^/saml(.*)$ /saml$1 break;
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/saml(.*)$ /saml$1 break;
|
||||||
proxy_pass http://kubeshark-hub;
|
proxy_pass http://kubeshark-hub;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
@ -46,6 +46,17 @@ data:
|
|||||||
proxy_pass_request_headers on;
|
proxy_pass_request_headers on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{- if (((.Values.tap).routing).front).basePath }}
|
||||||
|
location {{ .Values.tap.routing.front.basePath }} {
|
||||||
|
rewrite ^{{ .Values.tap.routing.front.basePath }}(.*)$ $1 break;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
expires -1;
|
||||||
|
add_header Cache-Control no-cache;
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
Loading…
Reference in New Issue
Block a user