当我把allow-same-origin,它可以工作但是当我删除它时,我有:
阻止具有原点“http://localhost:****”的帧访问跨源帧。
我只需要允许allow-scripts和allow-modals。
这是工作代码:
function updateIframe(iframe) {
iframe[0].contentWindow.getMinHeight();
}
我在论坛上搜索,但iframe和网站的协议和域名是相同的。我不明白错误在哪里。
父母:http://localhost****
iframe src:http://localhost:****/My/path/for/the/file
端口是相同的,我需要避免允许相同来源的cookie安全性
如果****用于不同的端口,请注意该端口也必须相同才能被视为同源请求。