DevKits

Security · Response header

X-Content-Type-Options

Disables MIME-type sniffing.

What is X-Content-Type-Options?

With `nosniff`, browsers refuse to interpret files as a type other than the declared Content-Type — mitigating the class of attacks where a user-uploaded image is served and executed as JavaScript.

Typical usage

Set on every response.

Examples

X-Content-Type-Options: nosniff

Specification

Fetch Standard

Related headers