How to disable Nginx double gzip encoding when fastcgi backend occasionally serves gzipped with content-encoding?

前端 未结 1 901
青春惊慌失措
青春惊慌失措 2021-01-06 07:47

Is there any clever way to trick nginx to stop gzip if the backend already has set the \"content-encoding\" header?

Nginx is configured to gzip the output from the p

1条回答
  •  有刺的猬
    2021-01-06 08:38

    Somewhere in nginx.conf where it applies (there should be a fastcgi_params file somewhere) :

    fastcgi_param  HTTP_ACCEPT_ENCODING      "";
    

    This will disable the encoding from the backend.

    I hope that still Nginx will serve encoded content after this. (I am not sure)

    0 讨论(0)
提交回复
热议问题