html - Confluence 无法完全显示 iframe 的内容(CORS 问题)
问题描述
我正在使用托管公共 Grafana 仪表板的“Raintank”网站。这是他们给我的 iframe:
<iframe src="https://snapshot.raintank.io/dashboard-solo/snapshot/lBtQQ...?orgId=2&from=1596254400000&to=1620432682439&panelId=16" width="450" height="200" frameborder="0"></iframe>
我想在 Confluence 中显示这个 iframe,所以在 Confluence 中,我做了“插入更多内容 - 其他宏 - iframe”。我将 iframe 链接放入“https://snapshot.raintank.io/dashboard-solo/snapshot/lBtQQ...?orgId=2&from=1596254400000&to=1620432682439&panelId=16”。
保存后,我看到了部分 iframe 加载(我看到了来自 raintank 站点的加载 gif),但随后它永远加载。查看浏览控制台,我看到:
Access to fetch at 'https://snapshot.raintank.io/img/online.svg' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
知道如何解决这个 CORS 问题吗?
解决方案
推荐阅读
- r - setdiff(x,y) 错误:返回 x 而不是仅在 x 中而不是在 y 中的值
- codenameone - Codename One EasyThread.addGlobalErrorListener usage
- python - 如何修复此错误并与导入 sklearn 相关?
- jsf - 为什么dataTable不显示项目?
- sql - 重新启动 T-SQL 中的行号
- flutter - 颤振应用内购买-在应用发布后可以删除广告吗?
- c++ - 16 个嵌套 For 循环加速 C++/Rcpp
- python - 使用 re 和 glob 库更改路径中的文件夹以进行写入
- javascript - 如何从对象中导出数据?
- node.js - 使用 firebase 服务处理文件