Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.squirrelscan.com/llms.txt

Use this file to discover all available pages before exploring further.

Checks for MIME type sniffing protection
Rule IDsecurity/x-content-type
CategorySecurity
ScopeSite-wide
Severityinfo
Weight3/10

Solution

X-Content-Type-Options: nosniff prevents browsers from MIME-sniffing responses, which could lead to security vulnerabilities. This is especially important for sites that allow file uploads or serve user-generated content. Simply add the header: X-Content-Type-Options: nosniff. This has no downside and improves security.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["security/x-content-type"]

Disable all Security rules

squirrel.toml
[rules]
disable = ["security/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["security/x-content-type"]
disable = ["*"]