allow cors

This commit is contained in:
Aleksandr 2025-10-16 23:08:18 +03:00
parent 18b827690f
commit 50e9d0d1e0
2 changed files with 4 additions and 1 deletions

View file

@ -58,10 +58,13 @@ pub async fn serve(
}
pub fn make_router<T: Types>(service: T::Service) -> axum::Router {
use tower_http::cors;
let scope = handler::RouterScope::root(State::<T> { service });
routes::make(scope)
.into_axum()
.layer(fastrace_axum::FastraceLayer)
.layer(cors::CorsLayer::permissive())
}
#[perfect_derive(Clone)]