问题
My gzip config looks like this:
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 1500;
gzip_types text/css application/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
You will notice that text/html is not in my list of types, but Chrome is showing that it's gzipped anyway. This article says that text/html is enabled by default. I want to disable it for security reasons. How can I do that?
回答1:
From the docs:
Responses with the “
text/html” type are always compressed.
You can disable gzip entirely:
gzip off
This article suggests disabling SSL compression entirely.
来源:https://stackoverflow.com/questions/29779960/how-to-disable-gzip-compression-for-text-html