vssue: [Question] has been blocked by CORS policy
Environment
- Vssue Version: latest
- Platform: GitHub
- OS: Windows 10
- Browser: chrome 74
配置如下:
[‘@vssue/vuepress-plugin-vssue’, {
locale: ‘zh’,
platform: ‘github’,
owner: ‘xx’,
repo: ‘xx’,
clientId: ‘xx’,
clientSecret: ‘xx’,
proxy: url => https://api.github.com?target=${url}
}]
vuepress 在本地运行没有问题,发布后报错,cors 的错误: has been blocked by CORS policy: Request header field accept is not allowed by Access-Control-Allow-Headers in preflight response.
项目发布后不能提交评论、也获取不到评论信息。(但在本地运行一切正常)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (9 by maintainers)
@WuLianN 不要手动指定 axios 0.19 版本就好了。后面可能会考虑使用原生 fetch 代替 axios