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>
This commit is contained in:
Dean Wenstrand
2026-02-25 08:14:08 -08:00
parent 21624396bc
commit 29612cd420

View File

@@ -55,6 +55,7 @@
access_log /dev/stdout; access_log /dev/stdout;
server { server {
gzip on; gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
listen 80; listen 80;
index index.php index.html; index index.php index.html;