summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-30 10:55:26 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-30 10:55:26 -0500
commit82da024a4df2a626633a49f70dd3a2889b525d15 (patch)
treea997837757d8a63f44160469c540e8759d553479 /cmd/web.go
parent5c866fc737cee56ee1e8e5f9213edc72a3577700 (diff)
downloadgitea-82da024a4df2a626633a49f70dd3a2889b525d15.tar.gz
gitea-82da024a4df2a626633a49f70dd3a2889b525d15.zip
fix #687
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 6875ddb1d1..9975fa237b 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -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