We have a scenario in our Kentico 10 website, for that we need to modify Iframe parent elements from Iframe. Domain names of Iframe and parent are different. Could you please suggest a way to do that?
We added “<meta http-equiv="Access-Control-Allow-Origin" content="*">” but still the error is occurring.
Please suggest a way to make this done.
I'd suggest checking out the documentation here. It talks about setting the x-frame-options as needed.
Access-Control-Allow-Origin is only for XHR requests. IFRAME has nothing to do with it.
For IFRAME you you have to follow Same Origin Policy. You may try to add
document.domain = 'example.com' to your pages, to see if that works
I set document.domain to the same domain name in Parent as well as in Iframe. It solved the issue. I didn't apply any meta tags.
Please, sign in to be able to submit a new answer.