简体   繁体   中英

How to resolve cross-origin frame loading on Chrome?

iframe loading is failing for my site in Chrome, but working fine on Firefox.

PFA for snapshot for the error message:

在此处输入图片说明

Error message in chrome:

Uncaught DOMException: Blocked a frame with origin " http://localhost:9001 " from accessing a cross-origin frame. at Object.FCKTools.FixDocumentParentWindow ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42291 ) at Object.FCKTools.FixDocumentParentWindow ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42372 ) at Object.FCKTools.FixDocumentParentWindow ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42372 ) at Object.FCKTools.GetDocumentWindow ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42168 ) at Object.FCKTools.GetElementWindow ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:42032 ) at FCKToolbarFontSizeCombo.FCKToolbarSpecialCombo.Create ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:204406 ) at FCKToolbar.Create ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7 :220569 ) at FCKToolbarSet.Load ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/js/fckeditorcode_gecko.js:7:225568 ) at LoadToolbar ( http://localhost:9001/cmscockpit/zkau/web/js/ext/FCKeditor/editor/fckeditor.html?InstanceName=z_1t_ld5!ed:194:15 ) at Object.StartNext (:1:644)

Warning in firefox:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/

Not sure why the cross-origin error is coming up here, because the protocol, domain and the port are same in both the places.

Possible reasons:

1) The server is blocking the content to open in an iframe. To be implemented at server. 2) CORS. To be implemented at server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM