用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.

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

阅读 3.9k
1 个回答

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

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题