mirror of
https://github.com/project-zot/zot.git
synced 2025-01-06 22:40:28 -05:00
fix(extensions): setup UI extension as last one (#1572)
because UI routes will setup a http.FileServer on '/' any router setup after UI will be ignored at runtime becuase gorrilla will route it to http.Fileserver instead. Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
bd7b21f3dc
commit
7881ce32b2
1 changed files with 3 additions and 1 deletions
|
@ -133,10 +133,12 @@ func (rh *RouteHandler) SetupRoutes() {
|
|||
ext.SetupUserPreferencesRoutes(rh.c.Config, prefixedExtensionsRouter, rh.c.StoreController, rh.c.RepoDB,
|
||||
rh.c.CveInfo, rh.c.Log)
|
||||
|
||||
ext.SetupUIRoutes(rh.c.Config, rh.c.Router, rh.c.StoreController, rh.c.Log)
|
||||
ext.SetupMetricsRoutes(rh.c.Config, rh.c.Router, rh.c.StoreController, AuthHandler(rh.c), rh.c.Log)
|
||||
|
||||
gqlPlayground.SetupGQLPlaygroundRoutes(rh.c.Config, prefixedRouter, rh.c.StoreController, rh.c.Log)
|
||||
|
||||
// last should always be UI because it will setup a http.FileServer and paths will be resolved by this FileServer.
|
||||
ext.SetupUIRoutes(rh.c.Config, rh.c.Router, rh.c.StoreController, rh.c.Log)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue