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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user