Home  >  Q&A  >  body text

javascript - 用iframe嵌套微信的页面时,不能加载其中的图片

用iframe嵌套微信的页面时,不能加载其中的图片
F12 显示
Uncaught SecurityError: Blocked a frame with origin "http://mp.weixin.qq.com" from accessing a frame with origin "null". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Protocols must match.

这是不是没有办法解决了?

天蓬老师天蓬老师2719 days ago343

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-11 12:36:48

    微信公众号主要依靠 http 请求 head 的 referer 来防盗链的。

    解决方法就不给出了,这涉及到道德问题了。

    reply
    0
  • Cancelreply