问题

一直被这个问题困扰

1
2
3
4
Access to fetch at 'https://blog-api-mroxoa8vg-jiaxu07.vercel.app//comment?type=recent&count=4' 
from origin 'http://localhost:4000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'
header is present on the requested resource. If an opaque response serves your needs, set the request's
mode to 'no-cors' to fetch the resource with CORS disabled.

解决

怪我眼瞎

在_config.yml里的serverURL后面有一个斜杠,去掉即可。

效果