मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी75k · #3090

x-content-type

यह क्या करती है

यह स्किल जाँचती है कि वेब सर्वर nosniff सुरक्षा हेडर भेजता है या नहीं। यह उन डेवलपर्स और IT कर्मचारियों के लिए है जो आम हमलों के खिलाफ़ वेबसाइट मज़बूत करते हैं।

कब इस्तेमाल करें

  • ✓जब सर्वर के जवाबों में X-Content-Type-Options हेडर न हो।
  • ✓जब सुरक्षा चेकलिस्ट हेडर मज़बूत करने को कहे।
  • ✓जब फ़ाइलें अपलोड हों और फिर विज़िटरों को वापस परोसी जाएँ।

Skill का लिंक

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/x-content-type/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारा सुरक्षा स्कैन बताता है कि X-Content-Type-Options हेडर नहीं है। क्या आप उसे जोड़ सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट सर्वर या फ़्रेमवर्क कॉन्फ़िगरेशन में सभी जवाबों के लिए यह हेडर जोड़ता है। फिर वह जवाब के हेडर जाँचकर पुष्टि करता है कि हेडर मौजूद है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Set X-Content-Type-Options: nosniff

Browsers that MIME-sniff can be tricked into executing malicious JavaScript uploaded as an image — even if the server sends Content-Type: image/png. nosniff forces the browser to honor the declared type.

Quick Reference

  • Set X-Content-Type-Options: nosniff on all responses — the only valid value is nosniff
  • Without this header, browsers may execute a JavaScript file disguised as an image if the server serves it with the wrong MIME type
  • This header is required by OWASP's security hardening checklist and the Fetch specification
  • Pair with correct Content-Type headers on all responses for defense in depth
  • Takes 5 minutes to configure and has no compatibility issues

Check

Check whether the server sends an X-Content-Type-Options: nosniff header on responses. Verify the header is present on HTML pages, scripts, stylesheets, and API responses.

Fix

Add X-Content-Type-Options: nosniff to all HTTP responses. Configure it at the web server level (Nginx, Apache) or in your application framework, and verify with curl -I https://example.com.

Explain

Explain what MIME type sniffing is, how it can be exploited to execute malicious files, and how X-Content-Type-Options: nosniff prevents this attack.

Code Review

Review server config, headers, forms, and integration points related to Set X-Content-Type-Options: nosniff. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/security/x-content-type

अक्सर पूछे जाने वाले सवाल

nosniff क्या करता है?

यह ब्राउज़र को घोषित फ़ाइल प्रकार पर भरोसा करने को कहता है, न कि अनुमान लगाने और शायद हानिकारक फ़ाइल चलाने को।

क्या इसमें संगतता की समस्याएँ हैं?

स्किल कहती है कि इस हेडर की कोई ज्ञात संगतता समस्या नहीं है और इसे कुछ मिनटों में सेट किया जा सकता है।

जाँच कैसे करूँ कि यह काम कर रहा है?

स्किल curl अनुरोध से जवाब के हेडर जाँचने का सुझाव देती है।

जानकारी

लेखक का मूल विवरण

Use when auditing HTTP response headers on any web server or CDN for security hardening.

repo: thedaviddias/Front-End-Checklist

लोकप्रियता

GitHub स्टार
75k
रैंकिंग में स्थान
#3090
लाइसेंस
MIT
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills