Closed illuminatedwax closed 9 months ago
v0.5.0
Linux stonefree 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
cors
In trying to use CorsLayer with axum 0.6.18, I used the following code:
let mut app = Router::new().route("/foo", get(|| async {})); app = app.layer(CorsLayer::permissive());
and get the following error:
----- ^^^^ the trait `tower_service::Service<Request<_>>` is not implemented for `Cors<Route>`
The error goes away when I use version 0.4.4.
Axum is not yet able to be used with tower-http v0.5.
Bug Report
Version
v0.5.0
Platform
Linux stonefree 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Crates
cors
Description
In trying to use CorsLayer with axum 0.6.18, I used the following code:
and get the following error:
The error goes away when I use version 0.4.4.