Files
mc_cars_gmbh_infraestructure/frontend/nginx.conf
T

27 lines
760 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Never cache config.js / html so runtime config updates take effect.
location = /config.js { add_header Cache-Control "no-store"; try_files $uri =404; }
location ~* \.html$ { add_header Cache-Control "no-store"; try_files $uri =404; }
location / {
try_files $uri $uri/ /index.html;
}
# Static assets: images/fonts can be cached, JS/CSS must revalidate.
location ~* \.(?:jpg|jpeg|png|webp|svg|ico|woff2?)$ {
expires 7d;
add_header Cache-Control "public";
try_files $uri =404;
}
location ~* \.(?:css|js)$ {
add_header Cache-Control "no-cache";
try_files $uri =404;
}
}