这是我的 gzip 设置:
##
# Gzip Settings
##
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
# Don't compress anything under 256 bytes
gzip_min_length 256;
# gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_disable 'MSIE [1-6]\.(?!.*SV1)';
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-font-opentype
application/x-font-truetype
application/x-javascript
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/eot
font/opentype
font/otf
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
text/css
text/plain
text/javascript
text/x-component;
curl -IL https://example.com
HTTP/2 401
服务器:nginx
日期:格林威治标准时间 2018 年 12 月 28 日星期五 14:09:26
内容类型:文本/html;字符集=UTF-8
内容长度:7326
www-authenticate:基本领域=“启用隐私”
etag:“5c262af8-1c9e”
如您所见,gzip 未启用该页面
如何启用 401 页面 gzip?