location / {
proxy_pass http://my_app;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
gzip on;
gzip_proxied any;
gzip_vary on;
gzip_min_length 500;
gzip_types text/plain text/css
text/comma-separated-values
text/javascript application/x-javascript
application/javascript application/json;
# text/html is included by default
}
The conf file to be updated:
https://github.com/consected/restructure-demo-deploy/blob/main/aws/restructure-demo/platform/common/nginx/conf.d/https.conf
Update to add the gzip entries