diff options
Diffstat (limited to 'routers/init.go')
-rw-r--r-- | routers/init.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/init.go b/routers/init.go index 53b33f468f..fecc5c439c 100644 --- a/routers/init.go +++ b/routers/init.go @@ -185,8 +185,14 @@ func NormalRoutes(ctx context.Context) *web.Route { r.Mount("/", web_routers.Routes(ctx)) r.Mount("/api/v1", apiv1.Routes(ctx)) r.Mount("/api/internal", private.Routes()) + if setting.Packages.Enabled { - r.Mount("/api/packages", packages_router.Routes(ctx)) + // Add endpoints to match common package manager APIs + + // This implements package support for most package managers + r.Mount("/api/packages", packages_router.CommonRoutes(ctx)) + + // This implements the OCI API (Note this is not preceded by /api but is instead /v2) r.Mount("/v2", packages_router.ContainerRoutes(ctx)) } return r |