I am developing an application for a social network. When I try to access it I get an error in my browser:
Refused to display document because display forbidden by X-Frame-Options.
This social network uses Iframe. My question is, how do I change the header to solve this problem?
Considering Overcoming "Display forbidden by X-Frame-Options", in my servlet I tried command:
httpServletResponse.addHeader("X-FRAME-OPTIONS", "SAMEORIGIN" );
Considering http://www.rivercitystudio.com/blog/2011/09/google-maps-embedding-x-frame-options-change/ I've also tried adding in my url the following:
&output=embed
None of the two alternatives worked.
If it's your page that is in the frame, then don't send X-Frame-Options
at all. The default is to allow embedding.
If it's social network's page that is in the frame, then there's no way to disable it. The whole point of this is prevention of clickjacking via frames.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With