डुप्लिकेट MIME प्रकार "टेक्स्ट / html"?


132

मेरे पास Nginx कॉन्फ़िगरेशन फ़ाइलों में यह है

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

लेकिन शुरू करते समय Nginx त्रुटि देता है

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

वास्तव में किसकी नक़ल है text/html? क्या यह है text/plain?

जवाबों:


253

विकल्प के लिए gzip_types, माइम-प्रकार text/htmlको हमेशा डिफ़ॉल्ट रूप से शामिल किया जाता है, इसलिए आपको इसे स्पष्ट रूप से निर्दिष्ट करने की आवश्यकता नहीं है।


7
प्रासंगिक डॉक्स: wiki.nginx.org/HttpGzipModule#gzip_types Enables compression for additional MIME-types besides "text/html". "text/html" is always compressed.
— फ्रैंक किसान

6
यही बात ia पर लागू होती हैcharset_types
— wmamrak

वह लिंक टूटा हुआ है, नया लिंक: nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_types
— alexmuller

यही बात nginx.org/en/docs/http/…sub_filter_types में उल्लिखित पर लागू होती है : "टेक्स्ट / html" के अतिरिक्त निर्दिष्ट MIME प्रकारों के साथ प्रतिक्रियाओं में स्ट्रिंग प्रतिस्थापन को सक्षम करता है।
— प्रसिद्धगुर्किन
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.