When I enable gzip (Cache settings) in the Admin panel, my site starts showing strange/garbled characters instead of the page in some browsers. Turning it off makes the site work again but then my HTML isn’t compressed at all.
My setup:
•Grav 2.0.8 with Admin 2.0.12
•Shared hosting: nginx proxy in front of Apache (mod_deflate active)
•PHP 8.4.21
•Theme is custom, no special plugins touching output
The one clue I found: with gzip enabled, the response has two Content-Encoding headers at the same time
content-encoding: identity
content-encoding: gzip
which browsers apparently can’t decode. It looks like Grav sends the identity header itself and Apache adds the gzip one on top.
Is this a known issue? What’s the correct way to get compressed pages on an Apache/mod_deflate host , should gzip in Admin be off and something else configured instead? Any pointers appreciated.