mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 20:55:41 +02:00
26 lines
696 B
Nginx Configuration File
26 lines
696 B
Nginx Configuration File
server {
|
|
listen 3000;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# SPA fallback: rimanda tutto a index.html
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Cache aggressiva per assets (hash nel nome del file)
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, no-transform";
|
|
}
|
|
|
|
# Nessuna cache per index.html
|
|
location = /index.html {
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
|
gzip_min_length 1000;
|
|
}
|