fix: Alpine registry APKINDEX.tar.gz returns 405 for HEAD requests [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] (#38686)

### Description

Fixes #38676

The Alpine package registry registers for only, so a request returns .
Clients that probe the index with before fetching it (like and other
-based tools) fail outright.

**Fix:** Change to for the APKINDEX.tar.gz route, matching the pattern
already used by the i386 registry a few lines below.

### Related issue

Closes #38676

Co-authored-by: waterWang <waterWang@users.noreply.github.com>
This commit is contained in:
water
2026-07-28 22:22:01 +08:00
committed by GitHub
parent 0ab3d569b4
commit 717db275d5
+1 -1
View File
@@ -135,7 +135,7 @@ func CommonRoutes() *web.Router {
r.Group("/{branch}/{repository}", func() {
r.Put("", reqPackageAccess(perm.AccessModeWrite), alpine.UploadPackageFile)
r.Group("/{architecture}", func() {
r.Get("/APKINDEX.tar.gz", alpine.GetRepositoryFile)
r.Methods("HEAD,GET", "/APKINDEX.tar.gz", alpine.GetRepositoryFile)
r.Group("/{filename}", func() {
r.Get("", alpine.DownloadPackageFile)
r.Delete("", reqPackageAccess(perm.AccessModeWrite), alpine.DeletePackageFile)