How to allow cross origin on iframe through sandbox parameter

3.2k Views Asked by At

App is render as 'iframe' micro app and there is another 'iframe' within microapp 'iframe'.

Micro app iframe renders as below:

sandbox="allow-scripts allow-popups allow-modals allow-forms allowdownloads allow-same-origin"

when inner iframe try to access outer iframe then it creates below error:

Blocked a frame with other "https://microapp-ifram.com" from accessing a cross origin frame.`

Is there any way on "sandbox" parameter which can allow cross origin ?

By removing "sandbox" it worked but having "sandbox" causes CORS issue. I can not remove "sandbox" as its not in control. but, I can add any additional attribute to fix CORS.

Something like this if any valid sandbox parameter: sandbox="allow-scripts allow-popups allow-modals allow-forms allowdownloads allow-same-origin <ALLOW CROSS ORIGIN> "

0

There are 0 best solutions below