Skip to content
Skills Library
Security · Review & audit

x-content-type

/x-content-type

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

Licence
MIT
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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

Original author description

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

How it works

  1. Quick Reference
  2. Check
  3. Fix
  4. Explain
  5. Code Review
Original SKILL.md headings · 36 lines, 243 words
SKILL.md preview
---
name: x-content-type
description: "Use when auditing HTTP response headers on any web server or CDN for security hardening."
metadata:
  category: security
  priority: high
  difficulty: beginner
  estimatedTime: "5"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/security/x-content-type
---

# 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
Files in this package (2)
  • SKILL.md 2 KB
  • references/rule.md 4 KB

Versions

The database has no other skills named x-content-type.

Database snapshot: 13.11.2026 · package version aa0fa43ae2a9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100http-security-headers
    Verify and configure HTTP response security headers. Use when reviewing web server configuration, reverse proxy setup, or application middleware that sets response headers.
  • 100permissions-policy
    Use when reviewing HTTP response headers for defense-in-depth security hardening on any web application.
  • 100security-headers-audit
    Use when auditing the HTTP security headers of a website URL — scores 6 headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) out of 100 and produces a legal-markdown report with the 3 top corrections.
  • 100security-headers-configuration
    Configures HTTP security headers to protect against XSS, clickjacking, and MIME sniffing attacks. Use when hardening web applications, passing security audits, or implementing Content Security Policy.
  • 90security-headers
    Set the HTTP response headers that constrain what a browser will execute, embed, and leak on behalf of your origin. Use when hardening a web app against cross-site scripting, clickjacking, or referrer leakage, or when a security scan flags missing headers.
  • 100http-header-security-audit
    Execute http header security audit operations. Auto-activating skill for Security Fundamentals. Triggers on: http header security audit, http header security audit Part of the Security Fundamentals skill category. Use when analyzing or auditing http header security audit.…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.