Skip to content

Commit

Permalink
docs(passport): config passport-github behind of proxy (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
thonatos authored and popomore committed Apr 9, 2018
1 parent 84e0dc4 commit 33d3951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/source/zh-cn/tutorials/passport.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ exports.passportGithub = {
// config/default.js
config.passportGithub = {
key: 'your_clientID',
secret: 'your_clientSecret'
secret: 'your_clientSecret',
// callbackURL: '/passport/github/callback',
// proxy: false,
};
```

Expand All @@ -65,6 +67,9 @@ config.passportGithub = {
- 填写 `callbackURL`,如 `http://127.0.0.1:7001/passport/github/callback`
- 线上部署时需要更新为对应的域名
- 路径为配置的 `options.callbackURL`,默认为 `/passport/${strategy}/callback`
- 如应用部署在 Nginx/HAProxy 之后,需设置插件 `proxy` 选项为 `true`, 并检查以下配置:
- 代理附加 HTTP 头字段:`x-forwarded-proto``x-forwarded-host`
- 配置中 `config.proxy` 应设置为 `true`

### 挂载路由

Expand Down

0 comments on commit 33d3951

Please sign in to comment.