Search⌘ K

X-Content-Type-Options

Explore how the X-Content-Type-Options HTTP header improves security by disabling MIME-sniffing in browsers. Understand the risks of MIME-sniffing, such as malicious script execution through file uploads, and how setting this header protects users by enforcing strict content type interpretation.

We'll cover the following...

MIME-sniffing

Sometimes, clever browser features end up hurting us from a security standpoint. One example is MIME-sniffing, a technique popularized by Internet Explorer.

MIME-sniffing is the ability for a browser to auto-detect (and fix) the content type of a resource it is downloading. Say for example, we ask the browser to render an image at /awesome-picture.png, but the ...