Created
February 20, 2014 15:35
-
-
Save geedew/9116449 to your computer and use it in GitHub Desktop.
A whilte-listed Apache solution for X-Frame-Options SAMEORIGIN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
# ... | |
<IfModule mod_headers.c> | |
# Allow some urls, block all others; whitelisting | |
<LocationMatch ^((?!(firstUrlAllowed|secondUrlAllowed)).)*$> | |
Header always append X-Frame-Options SAMEORIGIN # Block any site from applying an iframe. | |
</LocationMatch> | |
</IfModule> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, is it not working for the pattern for Eg:: https://test.sub.entries.com.
Actually i tried with the string "entries" as well as full URL(https://test.sub.entries.com) in the firstUrlAllowed field.
Shall i need to add any thing extra? Please help me out.