first commit

This commit is contained in:
Mateusz Gruszczyński
2026-04-12 22:34:49 +02:00
parent d4f14832b3
commit d874d015fd
3 changed files with 15 additions and 5 deletions

View File

@@ -3,6 +3,11 @@ 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 _;
@@ -46,8 +51,7 @@ server {
}
location = /index.html {
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
add_header Cache-Control "no-store, no-cache" always;
try_files $uri =404;
}
@@ -73,6 +77,12 @@ server {
}
location / {
try_files $uri $uri/ /index.html;
proxy_pass http://web:80/;
if ($static_file) {
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
add_header Cache-Control "no-store, no-cache" always;
}
}