Hi,
I’m trying to test different types of compression on some of my webpages but when I try to set the set the headers to either gzip or br I get “(failed)net::ERR_CONTENT_DECODING_FAILED” in the status. However, in the response I am getting a status 200 with the correct content-encoding applied but with a blank page.
I am currently testing locally, but is this something I would need to setup with whatever I’m using to serve the pages? i.e. Apache?
Here is the snippet of code:
async def gzip_page(request):
return response.json(
{'message': 'OK'},
headers={'Content-Encoding': 'gzip'},
content_type='text/plain; charset=utf-8'
)