Skip to content

Commit 0a80164

Browse files
lunnyzeripath
authored andcommitted
Revert "API should follow RequireSignInView (#8654)" (#8675)
This reverts commit 3c63c3a.
1 parent 3c63c3a commit 0a80164

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

routers/api/v1/api.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ func RegisterRoutes(m *macaron.Macaron) {
862862
m.Group("/topics", func() {
863863
m.Get("/search", repo.TopicSearch)
864864
})
865-
}, securityHeaders(), reqTokenBySetting(), context.APIContexter(), sudo())
865+
}, securityHeaders(), context.APIContexter(), sudo())
866866
}
867867

868868
func securityHeaders() macaron.Handler {
@@ -874,10 +874,3 @@ func securityHeaders() macaron.Handler {
874874
})
875875
}
876876
}
877-
878-
func reqTokenBySetting() macaron.Handler {
879-
if setting.Service.RequireSignInView {
880-
return reqToken()
881-
}
882-
return func(ctx *macaron.Context) {}
883-
}

0 commit comments

Comments
 (0)