Skip to content

Instantly share code, notes, and snippets.

@sergejmueller
Last active March 9, 2016 09:54
Show Gist options
  • Save sergejmueller/3c4351ec29576fb441fe to your computer and use it in GitHub Desktop.
Save sergejmueller/3c4351ec29576fb441fe to your computer and use it in GitHub Desktop.
Set X-Frame-Options SAMEORIGIN for all files but not for /embed/ files.
<IfModule mod_setenvif.c>
SetEnvIf Request_URI "/embed/$" IS_embed
Header set X-Frame-Options SAMEORIGIN env=!REDIRECT_IS_embed
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment