Files
KnowStreaming/km-dist/helm/charts/knowstreaming-web/templates/configMap.yaml
2022-08-23 19:01:53 +08:00

59 lines
2.1 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "knowstreaming-web.fullname" . }}
labels:
app: {{ template "knowstreaming-web.name" . }}
chart: {{ template "knowstreaming-web.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: server
data:
knowStreaming.conf: |
server {
listen 80;
server_name localhost;
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 4;
gzip_http_version 1.0;
gzip_min_length 1280;
gzip_types text/plain text/css text/xml application/x-javascript application/xml application/xml+rss application/json application/javascript text/*;
gzip_vary on;
root /pub;
location / {
root /pub;
if ($request_filename ~* .*\.(?:htm|html|json)$) {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
try_files $uri /layout/index.html;
}
location ~* \.(json)$ {
add_header Cache-Control no-cache;
}
location @kmfallback {
}
#location ~ ^/(clusters|config|cluster|login) {
# rewrite ^.*$ /;
#}
location ~ ^/ks-km/api/v3 {
#rewrite ^/ks-km/api/v3/(.*)$ /ks-km/ks-km/api/v3/$1 break;
proxy_pass http://{{ .Release.Name }}-knowstreaming-manager;
#proxy_pass http://127.0.0.1:8080;
#proxy_cookie_path /ks-km/ /;
#proxy_set_header Host $host;
#proxy_set_header Referer $http_referer;
#proxy_set_header Cookie $http_cookie;
#proxy_set_header X-Real-Ip $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/logi-security/api/v1 {
#rewrite ^/logi-security/api/v1/(.*)$ /ks-km/logi-security/api/v1/$1 break;
proxy_pass http://{{ .Release.Name }}-knowstreaming-manager;
#proxy_pass https://127.0.0.1:8080;
}
location ~ ^/(401|403|404|500){
rewrite ^.*$ /;
}
}