Compare commits

...

4 Commits

Author SHA1 Message Date
cb68ef9e8a fix browser caching 2025-10-28 16:18:56 -04:00
a28d43f381 Fix gzip 2024-12-09 13:40:22 -07:00
b84b666845 Fix fallback for missing 2024-12-09 13:21:45 -07:00
25a2b8c695 Enable gzip 2024-12-09 13:21:40 -07:00

View File

@@ -54,15 +54,34 @@
include ${mimeTypes};
access_log /dev/stdout;
server {
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
listen 80;
index index.php index.html;
charset utf-8;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
location /bundles/ {
gzip_static on;
root ${staticAssetsPath};
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable";
}
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot)$ {
gzip_static on;
root ${staticAssetsPath};
try_files $uri =404;
add_header Cache-Control "public, max-age=31536000, immutable";
}
location / {
root ${staticAssetsPath};
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
root ${staticAssetsPath};
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, must-revalidate";
}
}
}