Files

22 lines
573 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Asset con hash nel nome: cache lunga
location ~* "\.[0-9a-f]{8,}\.(js|css|svg|png|jpg|jpeg|gif|webp|woff2?)$" {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Fallback per il routing lato client di Angular
location / {
try_files $uri $uri/ /index.html;
}
}