mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Implement Cargo HTTP index (#24452)
This implements the HTTP index [RFC](https://rust-lang.github.io/rfcs/2789-sparse-index.html) for Cargo registries. Currently this is a preview feature and you need to use the nightly of `cargo`: `cargo +nightly -Z sparse-registry update` See https://github.com/rust-lang/cargo/issues/9069 for more information. --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
48e3e38ee0
commit
723598b803
4 changed files with 136 additions and 38 deletions
|
@ -119,6 +119,12 @@ func CommonRoutes(ctx gocontext.Context) *web.Route {
|
|||
r.Get("/owners", cargo.ListOwners)
|
||||
})
|
||||
})
|
||||
r.Get("/config.json", cargo.RepositoryConfig)
|
||||
r.Get("/1/{package}", cargo.EnumeratePackageVersions)
|
||||
r.Get("/2/{package}", cargo.EnumeratePackageVersions)
|
||||
// Use dummy placeholders because these parts are not of interest
|
||||
r.Get("/3/{_}/{package}", cargo.EnumeratePackageVersions)
|
||||
r.Get("/{_}/{__}/{package}", cargo.EnumeratePackageVersions)
|
||||
}, reqPackageAccess(perm.AccessModeRead))
|
||||
r.Group("/chef", func() {
|
||||
r.Group("/api/v1", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue