Origin Pull Compression
You can activate the "Origin Pull Compression" option in your personal account.
This feature helps you to reduce the bandwidth between origin and CDN servers. Also, content delivery speed becomes higher because of reducing the time for compressing files in a CDN.
Enable " Origin Pull Compression" to make a CDN pull already compressed content. Your server should support compression. CDN servers won't unzip your content even if a user's browser doesn't accept compression (actually nowadays almost all browsers accept it).
Note that this feature and "GZip Compression" exclude each other and don't work together.
Content compression without settings on CDN
Origin supports compression
If you want to send compressed or uncompressed content via CDN depending on the request received from the end user, you should disable all compression settings in your personal account and perform some settings on your side.
On the origin should be configured two HTTP headers: "Vary: Accept-Encoding" and " Accept-Encoding: gzip and / or deflate, br" (depends on the configuration on your server).
While processing a request from end users, CDN servers check the "Accept-Encoding" HTTP header. If the header contains gzip and / or deflate, br, meaning that the browser can accept compressed content, the CDN will request the compressed version of the file from the origin. If there are no such directives, the server will send an uncompressed file.
If the "Accept-Encoding" header is present on the server, but the "Vary: Accept-Encoding" header is not, the CDN will cache the file that was first requested (compressed or not). This may cause difficulties in displaying content for the end user.
For example, you need to send an uncompressed file from the CDN to the end user, but there is only a compressed file in the CDN cache. Then the user will get the compressed file, and the browser will not be able to display it.
If the header "Vary: Accept-Encoding" is configured, two versions of the file store in the CDN servers’ cache.
Origin doesn't support compression
The CDN servers store an uncompressed version of the file. Regardless of whether the end user requests a compressed file or not, from the cache will be sent an uncompressed file.