chore(api): move token auth to rust api service

This commit is contained in:
alyssa 2024-08-04 07:29:57 +09:00
parent 8210cb23f6
commit cfde105e19
8 changed files with 83 additions and 27 deletions

View file

@ -135,6 +135,7 @@ async fn main() -> anyhow::Result<()> {
.layer(axum::middleware::from_fn(middleware::logger))
.layer(middleware::ratelimit::ratelimiter(middleware::ratelimit::do_request_ratelimited)) // this sucks
.layer(axum::middleware::from_fn_with_state(ctx.clone(), middleware::authnz))
.layer(axum::middleware::from_fn(middleware::ignore_invalid_routes))
.layer(axum::middleware::from_fn(middleware::cors))