抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

云藉のBlog

雲しゃのブログ | 记录滴滴点点,穿梭片片汪洋

问题

一直被这个问题困扰

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后面有一个斜杠,去掉即可。

效果

评论