Skip to content

Instantly share code, notes, and snippets.

@rcg4u
Created December 5, 2020 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcg4u/45dbff2b4c8d599ebafa11b82685a949 to your computer and use it in GitHub Desktop.
Save rcg4u/45dbff2b4c8d599ebafa11b82685a949 to your computer and use it in GitHub Desktop.
#apache security headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options nosniff
Header set Strict-Transport-Security "max-age=31536000;"
Header set Referrer-Policy "same-origin"
Header set Feature-Policy "accelerometer 'none' ; ambient-light-sensor 'none' ; autoplay 'none' ; camera 'none' ; encrypted-media 'none' ; fullscreen 'none' ; geolocation 'none' ; gyroscope 'none' ; magnetometer 'none' ;microphone 'none' ; midi 'none' ; payment 'none' ; speaker 'none' ; sync-xhr 'none' ; usb 'none' ; notifications 'none' ; vibrate 'none' ; push 'none' ; vr 'none' "
Header set Content-Security-Policy: "script-src 'self'"
Header always append X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment