X-Content-Type-Options
SecurityActiveThe X-Content-Type-Options header with value 'nosniff' prevents browsers from MIME-type sniffing – guessing the content type from the response body instead of using the declared Content-Type. MIME sniffing can allow attackers to serve malicious content disguised as benign files.
X-Content-Type-Options: nosniff
Description
X-Content-Type-Options: nosniff prevents browsers from interpreting files as a different MIME type than declared. Without this header, browsers may 'sniff' the content and execute a JavaScript file served as text/plain, or display a HTML file served as text/csv. This header has only one valid value: nosniff.
Examples
Standard usage
http
X-Content-Type-Options: nosniff