From bd9f8c995950db3e9dd0440f80478974bb1068cb Mon Sep 17 00:00:00 2001 From: Roman Khabarov Date: Thu, 30 May 2024 11:30:32 +0200 Subject: [PATCH] fix --- .helm/templates/Deployment.yaml | 29 ++++++++++++++++++++--------- .helm/templates/Ingress.yaml | 3 +++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.helm/templates/Deployment.yaml b/.helm/templates/Deployment.yaml index 3c08d59..887e31d 100755 --- a/.helm/templates/Deployment.yaml +++ b/.helm/templates/Deployment.yaml @@ -34,22 +34,33 @@ data: server { listen 80; + location / { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /index.html; - gzip_static on; + try_files $uri $uri/ /index.html; + } + + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { + root /usr/share/nginx/html; + expires 1y; + access_log off; + add_header Cache-Control "public"; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; } - error_page 500 502 503 504 /50x.html; gzip on; gzip_http_version 1.1; - gzip_disable "msie6"; - gzip_min_length 1100; - gzip_vary on; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - gzip_comp_level 9; + gzip_disable "msie6"; + gzip_min_length 1100; + gzip_vary on; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + gzip_comp_level 9; } } --- diff --git a/.helm/templates/Ingress.yaml b/.helm/templates/Ingress.yaml index 4d21fd7..6fe901e 100755 --- a/.helm/templates/Ingress.yaml +++ b/.helm/templates/Ingress.yaml @@ -6,6 +6,9 @@ metadata: annotations: kubernetes.io/ingress.class: "nginx" cert-manager.io/cluster-issuer: "letsencrypt" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/rewrite-target: /$1 spec: tls: - hosts: