Our project is on Amazon CDN. Now my vue project uses gzip compression. How should the server configure it?

cdngzip

how to configure the gzip file will be used when you access it.

the server configurations I visit from Baidu are all your Nginx configuration methods. I don"t know how to configure them on cdn

in addition, can it be set in the front-end webpack so that the reference to the project file refers directly to the gz file instead of the js file


1. First of all, it is a matter of enabling gzip compression to be a server-side container
2. When gzip compression is enabled, instead of accessing the gz file, the content transferred through http is compressed


S3. There is also a place in the bucket where you can set gzip


try to modify the bucket metadata, set Content Type to text/css or text/javascript, and set Content Encoding to gzip

.
Menu