I want to add clickjacking protection to my web site using X-Frame-Options.
Several pages in my web site are shown in a frame so I want to protect them but at the same time present them properly. From what I understand I need to use the SAMEORIGIN option in the X-Frame-Options value. But what exactly does SAMEORIGIN means? Does it mean the same website? The offical description I found is not very clear regarding what does it mean that 2 pages share the same ‘origin’…
Can someone here help me with this?
Thanks!
I want to add clickjacking protection to my web site using X-Frame-Options. Several pages
Share
An “origin” is a website’s scheme+host+port. That is,
http://example.com/has an origin of(http, example.com, 80).https://example.com/is a different origin, namely(https, example.com, 443).Setting the
x-frame-optionsheader toSAMEORIGINfor a page served fromhttp://example.com/means that only other pages onhttp://example.com/would be able to load that page in a frame.