javascript - 浏览器正在阻止来自其自己域的框架
问题描述
在此站点上:https ://mdintro.com/registration/?user_group_id=Employer我遇到了几个错误,这些错误会阻止用户在描述字段中输入文本。Chrome 和 Safari 显示此错误:
Uncaught DOMException: Blocked a frame with origin "https://mdintro.com" from accessing a cross-origin frame." fckeditorcode_gecko.js:36 ...
但为什么它会阻止来自同一域的帧?
Firefox(可能有其他标准)没有阻止这个框架,但它在 FCKeditor 上给出了以下警告:
"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/ fckeditorcode_gecko.js:67:105"
有人可以帮帮我吗!?
更新: 这个站点有一个 SmartJobBoard 管理面板,它使用相同的 FCKeditor 框架,结果没有错误。Chrome 也不会在控制台上显示任何错误,管理员用户可以在文本编辑器上输入文本。它们都引用同一个 FCKeditor 扩展。
这是https://mdintro.com/registration/?user_group_id=Employer上显示的框架
<!-- USER: REGISTRATION (CONSOLE ERROR: BLOCKED) -->
<iframe
id="CompanyDescription___Frame"
src="https://mdintro.com/system/ext/fckeditor/editor/fckeditor.html?InstanceName=default_value&Toolbar=BasicAdmin"
width="345px" height="200" frameborder="0" scrolling="no"
style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 345px; height: 200px;">
</iframe>
这是 SmartJobBoard 管理面板内显示的框架:
<!-- ADMIN: EDIT JOB POSTING (NO ERRORS) -->
<iframe
id="default_value___Frame"
src="https://mdintro.com/admin/../system/ext/fckeditor/editor/fckeditor.html?InstanceName=default_value&Toolbar=BasicAdmin"
width="100%" height="200" frameborder="0" scrolling="no"
style="margin: 0px; padding: 0px; border: 0px; background-color: transparent; background-image: none; width: 100%; height: 200px;">
</iframe>
已解决: 我从以下位置应用了 tdebroc 的解决方案:Blocked a frame with origin "<mydomain>" from access a frame with origin "https://www.facebook.com"
解决方案
推荐阅读
- php - AJAX POST 发送空格而不是 JSON 对象
- android-studio - 在 Intellij Idea 中从自动完成和自动导入中排除 kotlin.Result
- react-native-gifted-chat - 错误:命令失败:在主项目上运行 npm install 后 git rev-parse --git-dir
- html - iframe 不通过更改 subdmain 来启动 URL(不是 X-Frame-Options 问题)
- java - java.sql.SQLTransactionRollbackException: 当前语句的至少一个参数未初始化
- swift - 我在将我的 firebase 数据库中的子值放入 tableview 单元格中的标签框内时遇到问题
- django - 如何将模型“A”与模型“B”的属性相匹配?
- spring - 编码密码在 SpringBoot 2.1.4.RELEASE 中看起来不像 BCrypt
- hibernate - 使用主键作为外键的休眠 OneToOne 不起作用
- junit5 - 使用扩展的 JUnit 5 Jupiter 标签