feat: secure genrate key endpoint
CI / Rust CI (push) Successful in 2m9s
Publish & Deploy / Build and Push to Registry (push) Successful in 28s
Publish & Deploy / Deploy via SSH (push) Successful in 18s

This commit is contained in:
2026-05-07 20:59:01 +02:00
parent 7b98fab2c8
commit eaf197f86e
+1 -1
View File
@@ -27,7 +27,7 @@ pub fn protected_router() -> Router<AppState> {
.route(
"/keys/generate",
post(apikey::create_api_key).route_layer(middleware::from_fn(|req, next| {
require_roles(req, next, None, None)
require_roles(req, next, None, Some("admin"))
})),
)
}