google / ngx_brotli

NGINX module for Brotli compression
BSD 2-Clause "Simplified" License
2.08k stars 214 forks source link

Duplicate MIME type warning #104

Open rodehoed opened 4 years ago

rodehoed commented 4 years ago

Hi,

When restarting or reloading NGINX i'm getting the followin warning:

nginx: [warn] duplicate MIME type "text/html" in /etc/nginx/nginx.d/999-brotli.conf:27

My Brotli config:

brotli on; brotli_comp_level 6; brotli_static on; brotli_types application/atom+xml application/javascript application/json application/rss+xml application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/html text/xm

l;

It seems it's being caused by: _gziptypes text/plain text/css text/xml text/javascript application/x-javascript application/xml application/javascript;

It's strange because they are both under a different nginx directive.

AntoninGarnaud commented 4 years ago

Hello @rodehoed

I know that text/html is always compressed by gzip module, this seems to be the same for the ngx_brotli module. And that seems logical.

Please try your brotli.conf without the line text/html