No compression on JSON endpoints, in order to protect
from potential compression+encryption data leak attacks (like BREACH)
# resolver $DNS-IP-1 $DNS-IP-2 valid=300s;
# resolver_timeout 5s;
- # Enable compression for JS/CSS/HTML and JSON, for improved client load times
+ # Enable compression for JS/CSS/HTML bundle, for improved client load times.
+ # It might be nice to compress JSON, but leaving that out to protect against potential
+ # compression+encryption information leak attacks like BREACH.
gzip on;
- gzip_types text/plain text/css text/html application/javascript application/json;
+ gzip_types text/css text/html application/javascript;
gzip_vary on;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";