# Shared nginx server config for all Angular SPA containers. server { listen 80; root /usr/share/nginx/html; index index.html; # SPA fallback — deep links resolve to index.html location / { try_files $uri $uri/ /index.html; } # assets/env.js is runtime config, not a build artifact: it is bind-mounted per # environment (docker/fe-env/env.docker.js) or written at container start by # docker/spa-entrypoint.sh. The generic .js rule below would cache it for 7 days, # so a browser that loaded the app once keeps the OLD microfeHost until it expires # - which silently breaks the micro-frontend widgets (). # An exact-match location outranks the regex location, so this wins. location = /assets/env.js { expires -1; add_header Cache-Control "no-store, no-cache, must-revalidate"; try_files $uri =404; } # Cache immutable build artifacts location ~* \.(js|css|woff2?|ttf|svg|png|jpg|jpeg|gif|ico)$ { expires 7d; add_header Cache-Control "public"; try_files $uri =404; } }