Compare commits

...

7 Commits

Author SHA1 Message Date
135c041448 Prevent stale web shell caching 2026-07-15 17:01:18 -07:00
Dean Wenstrand
29612cd420 Add gzip_proxied any to enable compression behind reverse proxies
GCP HTTP(S) LB adds Via header to forwarded requests, causing nginx to
treat them as proxied. Without gzip_proxied, nginx skips dynamic gzip
for these requests, resulting in uncompressed JS/CSS responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 08:14:08 -08:00
21624396bc Merge pull request 'Fix browser caching for web app' (#1) from loewy/fix-browser-caching into master
Reviewed-on: #1
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2026-01-07 18:19:36 +00:00
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,37 @@
include ${mimeTypes};
access_log /dev/stdout;
server {
gzip on;
gzip_proxied any;
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;
etag off;
if_modified_since off;
add_header Cache-Control "no-store" always;
}
}
}