修正gh-oauth.imsun.net服务不可用
baifachuan opened this issue · 3 comments
baifachuan commented
我之前一直用的gh-oauth.imsun.net 这个作为github的代理,不过不稳定,会随时失效,最近很长一段时间无法使用,因为我自己的服务器也是https,我看了下这个地址的代码也是需要https,所以自行搭建了一个,使用方式为:
修改gitment.browser.js
文件的3416行将https://gh-oauth.imsun.net/
替换成:https://baifachuan.com:8443/
该服务器代码在:https://github.com/imsun/gh-oauth-server
,不会记录任何信息,我也是自己的博客使用:https:www.baifachuan.com
,因为该服务器需要https,所以构建在自己的服务下,需要的可以使用。
update the gitment.browser.js file replace https://gh-oauth.imsun.net/
to https://baifachuan.com:8443/
.
This service won't record or store anything. It only attaches a CORS header to that request and provides proxy. So that users can login in the frontend without any server-side implementation.
原样的部署了一套这个server,作为自己的服务的代理,也共享出来有需要的可以进行使用。修改代码结果:
_utils.http.post('https://www.baifachuan.com:8443', {
code: code,
client_id: client_id,
client_secret: client_secret
}, '').then(function (data) {
_this.accessToken = data.access_token;
_this.update();
}).catch(function (e) {
_this.state.user.isLoggingIn = false;
alert(e);
});
} else {
this.update();
}
JiYouMCC commented
我同理也在azure部署了一个自己的……
wowtalon commented