From 4a1635a8b9c45bfba52b1375304251c1f6ea4d78 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Wed, 25 Mar 2026 14:08:45 +0200 Subject: [PATCH] Fix: Update search to escape regex chars & fix CSS caching - Fixed search to properly escape special characters (parentheses, etc) - Changed nginx to not cache CSS/JS files aggressively - Updated image tags to v1.1.0 with Always pull policy - Images cache only 7 days instead of 1 year for CSS/JS --- oramap/templates/configmap.yaml | 15 +++++++++++---- oramap/values.yaml | 8 ++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/oramap/templates/configmap.yaml b/oramap/templates/configmap.yaml index ce380bc..e6f7496 100644 --- a/oramap/templates/configmap.yaml +++ b/oramap/templates/configmap.yaml @@ -37,9 +37,16 @@ data: proxy_set_header X-Forwarded-Proto $scheme; } - # Cache static assets - location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg)$ { - expires 1y; - add_header Cache-Control "public, immutable"; + # No cache for CSS and JS to allow quick updates + location ~* \.(css|js)$ { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires "0"; + } + + # Cache images only + location ~* \.(jpg|jpeg|png|gif|ico|svg)$ { + expires 7d; + add_header Cache-Control "public, max-age=604800"; } } diff --git a/oramap/values.yaml b/oramap/values.yaml index 7e5a009..2081f0e 100644 --- a/oramap/values.yaml +++ b/oramap/values.yaml @@ -4,8 +4,8 @@ replicaCount: 1 backend: image: repository: harbor.dvirlabs.com/my-apps/oramap-backend - tag: "latest" - pullPolicy: IfNotPresent + tag: "v1.1.0" + pullPolicy: Always containerPort: 3000 replicaCount: 1 resources: @@ -20,8 +20,8 @@ backend: frontend: image: repository: harbor.dvirlabs.com/my-apps/oramap-frontend - tag: "latest" - pullPolicy: IfNotPresent + tag: "v1.1.0" + pullPolicy: Always containerPort: 80 replicaCount: 1 resources: