Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问图片报403 #2

Closed
xgzl87 opened this issue Jul 3, 2017 · 5 comments
Closed

访问图片报403 #2

xgzl87 opened this issue Jul 3, 2017 · 5 comments

Comments

@xgzl87
Copy link

xgzl87 commented Jul 3, 2017

bundle.js:42622 GET http://images2015.cnblogs.com/blog/138012/201610/138012-20161022224222123-643915682.png 403 (Forbidden)

@yuohuo
Copy link

yuohuo commented Oct 1, 2017

可能是因为cnblog对图片盗链的拦截,可以图片换成本地

@mafeifan
Copy link

mafeifan commented Nov 2, 2017

在public/index.html里加 <meta name="referrer" content="no-referrer" /> 试试

@ittqqzz
Copy link

ittqqzz commented Feb 23, 2018

4楼说的,亲测是对的!感谢。

@mafeifan
Copy link

我这里重构了个优化版的,欢迎star。https://github.com/mafeifan/react-dianping

@ltimon
Copy link
Owner

ltimon commented Jun 7, 2018

大概是因为对方的服务器避免非法盗用,拒绝了我们的请求,可以参考@mafeifan的解决方案,我这里加了 有兴趣的可以点击这个看看https://blog.lyz810.com/article/2016/08/referrer-policy-and-anti-leech/

@ltimon ltimon closed this as completed Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@mafeifan @ltimon @xgzl87 @yuohuo @ittqqzz and others