Browse Source

fix #687

for-closed-social
Unknwon 10 years ago
parent
commit
82da024a4d
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      cmd/web.go

+ 4
- 2
cmd/web.go View File

@ -143,8 +143,10 @@ func newMacaron() *macaron.Macaron {
}))
// OAuth 2.
for _, info := range setting.OauthService.OauthInfos {
m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl))
if setting.OauthService != nil {
for _, info := range setting.OauthService.OauthInfos {
m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl))
}
}
m.Use(middleware.Contexter())
return m

Loading…
Cancel
Save