diff --git a/ord_interface/nginx.conf b/ord_interface/nginx.conf index b6c03ff..53eab72 100644 --- a/ord_interface/nginx.conf +++ b/ord_interface/nginx.conf @@ -14,8 +14,17 @@ http { access_log /dev/stdout; error_log /var/log/nginx.log; + # Compress the SPA's bundles and the API's JSON. Without gzip_types nginx compresses + # only text/html, and the load balancer in front passes responses through as they + # are. Level 6 is where the ratio on JSON levels off; higher levels run far slower + # for little more. gzip on; gzip_disable "msie6"; + gzip_comp_level 6; + gzip_min_length 1024; + gzip_proxied any; + gzip_vary on; + gzip_types text/plain text/css text/javascript application/javascript application/json application/xml image/svg+xml application/wasm; # Cache policy keyed on the (possibly rewritten) request path: content-hashed # Vite assets are immutable, the SPA entry point must always be revalidated,