Skip to content

Commit

Permalink
fix: Updated Metrics grouping (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Isawan authored Aug 31, 2023
2 parents 5398841 + 4f43322 commit bf763b1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,17 @@ pub(crate) fn provider_mirror_app<C: Clone + Send + Sync + CredentialHelper + 's
&["/api/v1/credentials/:hostname"],
)
.with_group_patterns_as(
"/:hostname/:namespace/:provider_type/index.json",
&["/:hostname/:namespace/:provider_type/index.json"],
"/mirror/v1/:hostname/:namespace/:provider_type/index.json",
&["/mirror/v1/:hostname/:namespace/:provider_type/index.json"],
)
.with_group_patterns_as(
"/mirror/v1/:hostname/:namespace/:provider_type/:version",
&["/mirror/v1/:hostname/:namespace/:provider_type/:version"],
)
.with_group_patterns_as(
"/:hostname/:namespace/:provider_type/:version",
&["/:hostname/:namespace/:provider_type/:version"],
"/mirror/v1/artifacts/:version_id",
&["/mirror/v1/artifacts/:version_id"],
)
.with_group_patterns_as("/artifacts/:version_id", &["/artifacts/:version_id"])
.build();

let api = crate::http::api::routes(APIState::from_ref(&state));
Expand Down

0 comments on commit bf763b1

Please sign in to comment.