Content-Encoding working on HTTP but not HTTPS

Hello,

I have GZIP encoding set on my origin server.
I am proxying through cloudflare to gather my files.
If I do it through HTTP, the content-encoding: gzip works, but if I do it through HTTPS, it doesn’t work… no content-encoding appears at all.

The configuration that I have on my htaccess is this one:

AddEncoding gzip .unityweb

My domain:

The files that should have the content-encoding on are:

  • WebGL build.wasm.code.unityweb
  • WebGL build.wasm.framework.unityweb
  • WebGL build.data.unityweb

I tested a direct connection to my origin server (ignoring cloudflare’s proxy) and it works on both HTTP and HTTPS.

Is there any special reason for this to be happening? Any hint on how to make the encoding work on HTTPS as well?

Ok, found out the problem.

When “Enable brotli compression for HTTPS” is turned on, doesn’t matter if you specify on your origin to use gzip, it will simply not use gzip.

By disabling this option my unityweb files are being compressed with GZIP on HTTPS.

Thanks.

This topic was automatically closed after 14 days. New replies are no longer allowed.