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