Restore cors by re-ordering middleware?
Compiler complains about the logger mw preceding the cors mw. Not sure why. Does it matter?
This commit is contained in:
parent
0c56668099
commit
293a8b109e
|
|
@ -7,6 +7,7 @@ edition = "2018"
|
|||
[dependencies]
|
||||
cloudevents-sdk = { path = "../..", features = ["cloudevents-actix"] }
|
||||
actix-web = "4.0.0-beta.8"
|
||||
actix-cors = "0.6.0-beta.2"
|
||||
lazy_static = "1.4.0"
|
||||
bytes = "^0.5"
|
||||
futures = "^0.3"
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ async fn main() -> std::io::Result<()> {
|
|||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
.wrap(actix_cors::Cors::permissive())
|
||||
.wrap(actix_web::middleware::Logger::default())
|
||||
.service(post_event)
|
||||
.service(get_event)
|
||||
|
|
|
|||
Loading…
Reference in New Issue