My website contains a Mapbox web map for which I host some Mapbox Vector Tile .pbf files. These files are natively GZip compressed so on my apache host server I add the Header “Content-Encoding: gzip”
As these are static files I added them to the Cloudflare cache using a page rule.
It seems that when Cloudflare caches these files it un-gzips them and then serves them uncompressed to the browser.
For example, if I fetch a .pbf file directly from my server its file size is 629.46 kB file but the transfer is only 315.86 kB (this matches the actual file size on my server). If I request the same file via Cloudflare it is a 629.46 kB file with a transfer size of 630.3 kB.
Is there a way to tell Cloudflare to no unzip these files and just keep them as they originally were?
Compression is disabled when the no-transform directive is present. If the original asset fetched from the origin is compressed, it is served compressed to the visitor. If the original asset is uncompressed, compression is not applied.