1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-22 09:28:28 +00:00

Add support for HEAD requests in Maven registry (#21834) (#21929)

Backport of #21834

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
KN4CK3R
2022-11-25 12:46:28 +01:00
committed by GitHub
parent 9ba4ef93ff
commit ff4e292b3f
19 changed files with 162 additions and 40 deletions

View File

@@ -179,6 +179,7 @@ func Routes(ctx gocontext.Context) *web.Route {
r.Group("/maven", func() {
r.Put("/*", reqPackageAccess(perm.AccessModeWrite), maven.UploadPackageFile)
r.Get("/*", maven.DownloadPackageFile)
r.Head("/*", maven.ProvidePackageFileHeader)
}, reqPackageAccess(perm.AccessModeRead))
r.Group("/nuget", func() {
r.Group("", func() { // Needs to be unauthenticated for the NuGet client.