Resolved an issue where the Waline service deployed on Vercel could not be connected

Original link: http://blog.fzdslr.cn/2022-10-02-fixWaline-Vercel.html

cause

When I was browsing the blog a few days ago, I found that the comments under my blog could not be loaded. After investigation, it was finally determined that vercel.app was inaccessible due to some mysterious force , resulting in the front-end of Waline unable to connect to the server deployed on vercel .

Solution

The solution to this problem is very clear: since vercel.app can’t be used, just replace it with another domain name. My solution is to use a second level domain name to assign to the server deployed on Vercel, and then change the server URL in the Hexo config file.

DNS configuration

Add a CNAME record in the DNS configuration interface of your own domain name, pointing to cname.vercel-dns.com .

Vercel configuration

The second-level domain name set before adding in Settings-Domains .

Hexo configuration

Take the Butterfly theme I am currently using as an example, modify it in _config.butterfly.yml

 1
2
 waline:
serverURL: https://xxxx.xxx.xx # Waline server address url

It is the second-level domain name set before.

Then regenerate the static page and deploy it.

This article is reproduced from: http://blog.fzdslr.cn/2022-10-02-fixWaline-Vercel.html
This site is for inclusion only, and the copyright belongs to the original author.