If you require gzip compression on responses with types other than text/html, and you're running Nginx, you have to turn it on explicitly. To do so, you can add something like the following to a virtual host configuration file (usually located in /etc/nginx/sites-enabled), inside the server block:

gzip on;
gzip_types text/plain application/xml text/css text/javascript application/javascript image/svg+xml application/json;
Read more
Subscribe to HTTP