Reputation: 673
It's an known issue that AMP Policy explicity forbides embeding Iframes with same orgin while setting the sandobox attributes:
<amp-iframe ... sandbox="allow-scripts allow-same-origin" src="same-as-the origin"../>
But as stated here: Setting both the allow-scripts and allow-same-origin keywords together when the embedded page has the same origin as the page containing the iframe allows the embedded page to simply remove the sandbox attribute and then reload itself, effectively breaking out of the sandbox altogether.
But for some reasons it does not work and my iframe content can't be displayed.
Error: origin of must not be equal to container...
How to overcome this Problem? (I need it only just for testing purposes so I I am well aware that this approach shouldn't be deployed live)
I had also installed an Chrom-Plugin for enabling cross-origin resource sharing but it hasn't any effect.
Either restarted the Chrom-browser with the --disable-web-security option... nothing has really worked so far
Upvotes: 0
Views: 841
Reputation: 93
It's OK for me with sandbox="allow-scripts". Do you have any CSP settings that blocks iFrames such as "frame-ancestors 'none';" or X-Frame-Options "deny" ?
Upvotes: 1