Add standard-compliant route to serve outdated R packages (#32783)
The R package repository currently does not have support for older versions of packages which should be stored in a separate /Archive router. This PR remedies that by adding a new path router. I am a member of a group that loves using Gitea and this bug has been annoying us for a long time. Hope it can be merged in time for Gitea 1.23.0. Any feedback much appreciated. Fixes #32782 (cherry picked from commit 874b8484aa9f7e10172fd1a8a7c768e70b36c475)
This commit is contained in:
parent
c368df39b0
commit
bf934c96c9
2 changed files with 9 additions and 0 deletions
|
@ -337,6 +337,7 @@ func CommonRoutes() *web.Route {
|
|||
r.Get("/PACKAGES", cran.EnumerateSourcePackages)
|
||||
r.Get("/PACKAGES{format}", cran.EnumerateSourcePackages)
|
||||
r.Get("/{filename}", cran.DownloadSourcePackageFile)
|
||||
r.Get("/Archive/{packagename}/{filename}", cran.DownloadSourcePackageFile)
|
||||
})
|
||||
r.Put("", reqPackageAccess(perm.AccessModeWrite), enforcePackagesQuota(), cran.UploadSourcePackageFile)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue