duplicate MIME type “text/html”?

2019-01-31 16:15发布

问题:

I have this in Nginx configuration files

gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

but Nginx give error when starting up

[warn]: duplicate MIME type "text/html" in /etc/nginx/nginx.conf:25

What is actually duplicate to text/html? Is it text/plain?

回答1:

For the option gzip_types, the mime-type text/html is always included by default, so you don't need to specify it explicitly.