prod build fix

This commit is contained in:
Mateusz Gruszczyński
2026-04-13 09:02:52 +02:00
parent f5c728af68
commit fe1e731e44
5 changed files with 65 additions and 29 deletions

View File

@@ -8,11 +8,6 @@ upstream backend_upstream {
keepalive 16;
}
map $uri $static_file {
~*\.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ 1;
default 0;
}
server {
listen 80;
server_name _;
@@ -53,13 +48,13 @@ server {
proxy_pass http://backend_upstream/redoc;
}
location ~* \.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ {
proxy_pass http://frontend_upstream;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
location / {
proxy_pass http://frontend_upstream;
if ($static_file) {
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
add_header Cache-Control "no-store, no-cache" always;
}
}