fix in reverse

This commit is contained in:
Mateusz Gruszczyński
2026-04-07 12:11:54 +02:00
parent 62b137fa1f
commit 8243058d98

View File

@@ -1,3 +1,8 @@
map $uri $static_file {
~*\.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ 1;
default 0;
}
server {
listen 80 default_server;
server_name ${SERVER_NAME};
@@ -38,12 +43,13 @@ server {
location / {
proxy_pass http://web:80/;
try_files $uri =404;
if ($static_file) {
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
add_header Cache-Control "no-store, no-cache" always;
}
location ~* \.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ {
proxy_pass http://web:80/;
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
}