解决微信公众号文章的防盗链

方法1.

写一个服务,把微信图片下载到本地,而后放在静态文件目录中,修改微信图片中的域名为本身的IP或域名,备注:程序请求时,referer须要时空的html

方法2.

使用七牛云的镜像存储功能,例如:
https://mmbiz.qlogo.cn/mmbiz/...
将mmbiz.qlogo.cn改成七牛提供的https域名:ob7x3eh4t.qnssl.com
即:
https://ob7x3eh4t.qnssl.com/m...
就能够访问了segmentfault

方法3.

简单点的话,在html模板的head里添加referer <meta name="referrer" content="never">微信



欢迎订阅「K叔区块链」 - 专一于区块链技术学习

博客地址: http://www.jouypub.com
简书主页: https://www.jianshu.com/u/756c9c8ae984
segmentfault主页: https://segmentfault.com/blog/jouypub
腾讯云主页: https://cloud.tencent.com/developer/column/72548
相关文章
相关标签/搜索