chore: Upgrade matchit to 0.8 (#2645)

This commit is contained in:
David Mládek
2024-10-03 15:46:58 +00:00
committed by GitHub
parent 5db62e8452
commit 6318b57fda
46 changed files with 414 additions and 208 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ async fn main() {
// Build our application by composing routes
let app = Router::new()
.route(
"/:key",
"/{key}",
// Add compression to `kv_get`
get(kv_get.layer(CompressionLayer::new()))
// But don't compress `kv_set`
@@ -125,7 +125,7 @@ fn admin_routes() -> Router<SharedState> {
Router::new()
.route("/keys", delete(delete_all_keys))
.route("/key/:key", delete(remove_key))
.route("/key/{key}", delete(remove_key))
// Require bearer auth for all admin routes
.layer(ValidateRequestHeaderLayer::bearer("secret-token"))
}