Why is Amazon S3 giving me 330 error about simple files?

I have added the header “Content-Encoding: gzip” to my S3 files, and now when I try to access them, it returns me “Error 330 (net :: ERR_CONTENT_DECODING_FAILED)”.

Please note that my files are just images, js and css.

How to solve this problem?

+4
source share
2 answers

You will have to manually gzip them and then upload them to S3. S3 does not have gzip capability on the fly, as your web server does.

EDIT: Images are already compressed, so do not use them.

+8
source

I don't know if you use Grunt as a deployment tool, but use this to compress your files:

https://github.com/gruntjs/grunt-contrib-compress

Then:

https://github.com/MathieuLoutre/grunt-aws-s3

To upload compressed files to Amazon S3. Et voila!

0
source

Source: https://habr.com/ru/post/1401440/


All Articles