Refactor maven package registry (#33049) (#33057)

Backport #33049
This commit is contained in:
wxiaoguang
2024-12-31 15:22:09 +08:00
committed by GitHub
parent 3df11c07a8
commit 68736ec292
4 changed files with 138 additions and 60 deletions

View File

@@ -465,8 +465,6 @@ func CommonRoutes() *web.Router {
r.Post("/api/charts", reqPackageAccess(perm.AccessModeWrite), helm.UploadPackage)
}, reqPackageAccess(perm.AccessModeRead))
r.Group("/maven", func() {
// FIXME: this path design is not right.
// It should be `/.../{groupId}/{artifactId}/{version}`, but not `/.../{groupId}-{artifactId}/{version}`
r.Put("/*", reqPackageAccess(perm.AccessModeWrite), maven.UploadPackageFile)
r.Get("/*", maven.DownloadPackageFile)
r.Head("/*", maven.ProvidePackageFileHeader)