IFRAME: Refuses to display a document because display is prohibited using X-Frame-Options

Possible duplicate:
Overcome "Display is prohibited using X-Frame-Options"

I have this HTML code on the server (Heroku). From iframe www.example.com I click the "Sign in to Google" button, but I get this error message:

Refused to display document because display forbidden by X-Frame-Options 

I tried adding <meta http-equiv="X-Frame-Options" content="GOFORIT"> to the www.example.com header, but it still doesn’t work. Any ideas? Thanks

 <html> <head> <title>Test</title> </head> <body> <iframe src="http://www.example.com" width=1000 height=1000></iframe> </body> </html> 
+4
source share
1 answer

You must use real HTTP response headers. <meta http-equiv> is not really equivalent.

How you install them depends on the programming language on the server and / or server side.

eg. for Apache, mod_headers :

 Header set X-Frame-Options GOFORIT 

... will do the job.

+6
source

Source: https://habr.com/ru/post/946910/


All Articles