gitalk Error: Request failed with status code 403 network error

编辑scripts.ejs,增加proxy。
路径:安装目录\aymar.cn\themes\主题名称\templates\includes\scripts.ejs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<script>
var gitalk = new Gitalk({
clientID: '<%= commentSetting.gitalkSetting.clientId %>',
clientSecret: '<%= commentSetting.gitalkSetting.clientSecret %>',
repo: '<%= commentSetting.gitalkSetting.repository %>',
owner: '<%= commentSetting.gitalkSetting.owner %>',
admin: ['<%= commentSetting.gitalkSetting.owner %>'],
proxy: 'https://netnr-proxy.cloudno.de/https://github.com/login/oauth/access_token',
id: (location.pathname).substring(0, 49), // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})

gitalk.render('gitalk-container')

</script>

proxy自建:https://github.com/Zibri/cloudflare-cors-anywhere

参考:
https://github.com/gitalk/gitalk/issues/429