0
votes

We want to serve gzipped files to the browser and it seems to be working with common file extensions such as css, txt, js etc.

However, when we change the extension to something else for e.g. filename.abc browser does not uncompress gzipped file even though Content-Encoding header is gzip. We have tried various combinations with Content-Type header.

How can we keep the custom extension of a file (say .abc) and still have browsers uncompress gzipped file automatically based on header info?

1

1 Answers

0
votes

We were adding Content-Encoding, Content-Type headers via AWS cli s3 cp --metadata option. Setting it with --content-encoding and --content-type worked fine.