du0204 2019-07-16 17:50
浏览 403
已采纳

无法在wordpress页面中加载iframe

I have been trying to load an section of page using iframe in my wordpress site. I can load certain sites in the iframe without any issue but while i try my required page it doesn't work as expected just inside the page. The iframe src is loading perfectly if its opened individually

I have tried most of the answers mentioned here in stackoverflow and other forums, still can't get a solution for this. I tried adding code in .htaccess, also tried adding code in functions.php

This is the iframe src I want to load.

It can be loaded individually in browser but not inside an iframe. I am getting the following error in console while i try to load it :

[ERROR] Permission denied to access property "hash" on cross-origin object

Is this an issue with my code, server config or with the URL itself?

Thanks

  • 写回答

1条回答 默认 最新

  • douxiong3245 2019-07-17 09:11
    关注

    It's about your source is blocking unauthorization call from domains not in CORS. They're only allow call from Origin https://ec.europa.eu. The short answer, you can't deal anything from your side.

    CORS

    More information about CORS: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 只改动本课件的 cal_portfolio_weight_series(decision_date), 跑完本课件。设计一个信息比率尽量高的策略。
  • ¥20 如何在visual studio 2022中添加ImageMagick库
  • ¥50 如何实现uniapp编译的微信小程序做可回溯视频
  • ¥15 求Houdini使用行家,付费。价格面议。
  • ¥15 前端高拍仪调用问题报错
  • ¥15 想用octave解决这个数学问题
  • ¥15 Centos新建的临时ip无法上网,如何解决?
  • ¥15 海康威视如何实现客户端软件对设备语音请求的处理。
  • ¥15 支付宝h5参数如何实现跳转
  • ¥15 MATLAB代码补全插值