hexo-theme-pure icon indicating copy to clipboard operation
hexo-theme-pure copied to clipboard

gitalk评论会显示403的问题解决

Open PP7Z opened this issue 2 years ago • 2 comments

原因:

主题模版中的cors-anywhere反向代理已不支持直接使用,需要更换。

修改如下:

  1. theme/pure/_config文件中找到gitalk的配置,在末尾加入下面一行:proxy: 'https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'

  2. 修改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/

PP7Z avatar Apr 19 '22 11:04 PP7Z

如上

PP7Z avatar Apr 19 '22 11:04 PP7Z

感谢分享

liliangCS avatar Feb 28 '23 07:02 liliangCS