Valine: Failed to load resource && 匿名头像不显示

博主发现其使用Valine的博客评论系统出现错误,表现为'Failed to load resource'以及匿名用户头像不显示。通过查看控制台,发现问题在于请求的CDN地址。解决方案包括修改评论文件,注释出CDN引用,更新LeanCloud的Server URLs,以及替换Gravatar为可用的SDN。最后,通过GitHub和jsDeliver托管更改后的文件,成功解决了头像显示问题。
摘要由CSDN通过智能技术生成

See this article in my blog: https://dyingdown.github.io/2023/02/07/Valine-Failed-to-load-resource-anonymous-avatar-not-shown/

Recently, I found my blog comment system can’t be used, with an error showing Failed to load resource: net::ERR_NAME_NOT_RESOLVED. And the avatar for the anonymous user is also not shown.

Failed to load resource

After seeing the console, I found that I’m requesting the url https://us.leancloud.cn. Because I used the national version of leancloud, but the valine.min.js uses cn as suffix.

Modify comment file

In order to change that, I need to specify the serverURLs when initiating the Valine object.

window.valine
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值