I think I found the answer
By enabling gzip compression on nginx, you enable it only for text / html (this is nginx by default http://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types )
To enable it for other types, you must do this explicitly. If you create a beanstalk, create the following file in your project
.ebextensions / gzip.config
and put the code there (make sure you keep the indentation, this is important):
files: /etc/nginx/conf.d/gzip.conf: content: | gzip_types application/json;
As you can see, in my case I needed gzip json files, you probably had problems with Pagespeed complaining about css and js files, right? As you can see from the link above, you can use the wildcard character * to compress everything, but if not, just list the mime types that you need in the configuration, expand them and check the PageSpeed โโproperties again.
source share