Skip to content

Instantly share code, notes, and snippets.

Created March 22, 2016 12:52
Show Gist options
  • Save anonymous/7dd8da89521944e37d48 to your computer and use it in GitHub Desktop.
Save anonymous/7dd8da89521944e37d48 to your computer and use it in GitHub Desktop.
Der X-Content-Type-Options Header
<?php
// Raw header
X-Content-Type-Options: nosniff
// How to send the response header with PHP
header("X-Content-Type-Options: nosniff");
// How to send the response header with Apache (.htaccess)
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment