allow cors
This commit is contained in:
parent
18b827690f
commit
50e9d0d1e0
2 changed files with 4 additions and 1 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue