tower-rs / tower-http

HTTP specific Tower utilities.
675 stars 156 forks source link

Cors not compatibile with axum 0.7.0 #464

Closed griebdaniel closed 6 months ago

griebdaniel commented 6 months ago

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>

jplatte commented 6 months ago

Which version of tower-http?

griebdaniel commented 6 months ago

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