tower-rs/tower-http

Cors not compatibile with axum 0.7.0

griebdaniel opened this issue · 2 comments

  • I have looked for existing issues (including closed) about this

Feature Request

Motivation

Compatibility with axum 0.7.0 regarding to cors functionality

Proposal

Allow this to work:
let app = Router::new().route("/supply", get(move || get_supplies(pool.clone()))).layer(CorsLayer::permissive());

Currently gives the following error:
the trait bound Cors<Route>: tower_service::Service<axum::http::Request<Body>> is not satisfied
the trait tower_service::Service<http::request::Request<ReqBody>> is implemented for Cors<S>

Which version of tower-http?

I'm sorry I used the wrong version of tower-http.