Fix nginx.conf syntax error - restore proper location block structure
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
dvirlabs 2026-03-25 03:59:26 +02:00
parent f2e300bc2a
commit b9bb5fef3b

View File

@ -16,18 +16,10 @@ server {
add_header Expires "0"; add_header Expires "0";
} }
# No cache for CSS and JS to allow quick updates # API proxy to backend service
location ~* \.(css|js)$ { # For Kubernetes: set BACKEND_HOST env var or use service name
add_header Cache-Control "no-cache, no-store, must-revalidate"; # For Docker Compose: backend service name is 'backend'
add_header Pragma "no-cache"; location /api/ {
add_header Expires "0";
}
# Cache images only
location ~* \.(jpg|jpeg|png|gif|ico|svg)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800";
}
# In Kubernetes, this will be: oramap-backend:3000 # In Kubernetes, this will be: oramap-backend:3000
# In Docker Compose, this will be: backend:3000 # In Docker Compose, this will be: backend:3000
# Default to backend:3000 # Default to backend:3000
@ -47,7 +39,16 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
# API proxy to backend service # No cache for CSS and JS to allow quick updates
# For Kubernetes: set BACKEND_HOST env var or use service name location ~* \.(css|js)$ {
# For Docker Compose: backend service name is 'backend' add_header Cache-Control "no-cache, no-store, must-revalidate";
location /api/ { 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";
}
}