- Config Apache
Header always append X-Frame-Options SAMEORIGIN
- Config nginx
add_header X-Frame-Options SAMEORIGIN;
- Define in the application header
* The document will be rendered (shown) in a frame only if the frame and it's
parent have the same origin.
<meta http-equiv="X-Frame-Options" content="sameorigin"/>
or @header('X-Frame-Options: sameorigin');
* The document may not be rendered inside of a frame
<meta http-equiv="X-Frame-Options" content="deny"/>
* Set to "Allow-From uri" The page can only be displayed in a frame on the
specified origin.
To detect if the site is vulnerable to clickJacking, create a file with iframe site component:
There are several ways to prevent the site vulnerable to clickJacking:
Remove iframe
Using X-Frame-Options