mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 12:58:02 +08:00
lint: Move out config reloader context from controller struct
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
353b0c6034
commit
be910cf01c
@@ -42,6 +42,7 @@ type RouteHandler struct {
|
||||
c *Controller
|
||||
}
|
||||
|
||||
// nolint: contextcheck
|
||||
func NewRouteHandler(c *Controller) *RouteHandler {
|
||||
rh := &RouteHandler{c: c}
|
||||
rh.SetupRoutes()
|
||||
@@ -53,6 +54,7 @@ func allowedMethods(method string) []string {
|
||||
return []string{http.MethodOptions, method}
|
||||
}
|
||||
|
||||
// nolint: contextcheck
|
||||
func (rh *RouteHandler) SetupRoutes() {
|
||||
rh.c.Router.Use(AuthHandler(rh.c))
|
||||
// authz is being enabled because authn is found
|
||||
|
||||
Reference in New Issue
Block a user