hexo-theme-pure
hexo-theme-pure copied to clipboard
gitalk评论会显示403的问题解决
原因:
主题模版中的cors-anywhere反向代理已不支持直接使用,需要更换。
修改如下:
-
theme/pure/_config
文件中找到gitalk
的配置,在末尾加入下面一行:proxy: 'https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
-
修改
themes/pure/layout/_script/_comment/gitalk.ejs
文件,在第15行下加入如下代码:proxy: '<%= theme.comment.gitalk.proxy %>',
文章参考:
- https://blog.csdn.net/nocodeis/article/details/117826704
- https://www.chenhanpeng.com/create-own-cors-anywhere-to-resolve-the-request-with-403/
如上
感谢分享