Nginx - Amazon Cloudfront - Gzip Doesn't work for JS files Nginx - Amazon Cloudfront - Gzip Doesn't work for JS files nginx nginx

Nginx - Amazon Cloudfront - Gzip Doesn't work for JS files


The response header gives:

Content-Type: application/javascript

This is the MIME type that needs to be included in your gzip_types statement in order to compress these types of response.

Your existing value contains many similar MIME types, but not one of them is an exact match for what the server actually sends.

See this document for details.