0

I'm trying to add sensenet's document library in a iframe, when I move file to another folder, there is an error "Uncaught DOMException: Blocked a frame with origin "http://localhost:8090" from accessing a cross-origin frame.". I'm using the chrome(Version 57.0.2987.133). But If I use IE 11, it worked well, could you please give me some suggestion to fix this issue?

Stack: at Object.RefreshExploreTree (http://localhost:8090/Root/Global/scripts/sn/SN.Util.js:354:38) at Object.success (eval at (http://localhost:8090/Root/Global/scripts/jquery/jquery.js:3:4904), :22:25)

4

1 回答 1

1

在某些情况下,使用时遇到的此错误是特定于浏览器的。如果您只满足于 GET 请求,那么使用 JSONP 的常用解决方案是一种替代方法。否则,您应该实施 CORS,这是 HTML5 中的首选解决方案。您可以从这里了解更多信息:

https://benohead.com/cross-document-communication-with-iframes/

sensenet ECM 还需要 CORS 的配置设置,但您可能已经知道:

http://wiki.sensenet.com/Cross-origin_resource_sharing

于 2018-01-12T11:47:32.703 回答