This reverts commit ffff835b73
.
This commit is contained in:
parent
66ceee08dc
commit
1bcbc02045
1 changed files with 1 additions and 8 deletions
|
@ -845,7 +845,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
m.Group("/topics", func() {
|
m.Group("/topics", func() {
|
||||||
m.Get("/search", repo.TopicSearch)
|
m.Get("/search", repo.TopicSearch)
|
||||||
})
|
})
|
||||||
}, securityHeaders(), reqTokenBySetting(), context.APIContexter(), sudo())
|
}, securityHeaders(), context.APIContexter(), sudo())
|
||||||
}
|
}
|
||||||
|
|
||||||
func securityHeaders() macaron.Handler {
|
func securityHeaders() macaron.Handler {
|
||||||
|
@ -857,10 +857,3 @@ func securityHeaders() macaron.Handler {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func reqTokenBySetting() macaron.Handler {
|
|
||||||
if setting.Service.RequireSignInView {
|
|
||||||
return reqToken()
|
|
||||||
}
|
|
||||||
return func(ctx *macaron.Context) {}
|
|
||||||
}
|
|
||||||
|
|
Reference in a new issue