Skip to content

Commit 6f58d63

Browse files
Fixed actix-web-example
Signed-off-by: Francesco Guardiani <[email protected]>
1 parent 6133a6e commit 6f58d63

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example-projects/actix-web-example/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ edition = "2018"
77
[dependencies]
88
cloudevents-sdk = { path = "../.." }
99
cloudevents-sdk-actix-web = { path = "../../cloudevents-sdk-actix-web" }
10-
actix-web = "2"
10+
actix-web = "^3"
1111
actix-rt = "1"
12-
actix-cors = "^0.2.0"
12+
actix-cors = "^0.5"
1313
lazy_static = "1.4.0"
1414
bytes = "^0.5"
1515
futures = "^0.3"

example-projects/actix-web-example/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use actix_web::{get, post, web, App, HttpRequest, HttpResponse, HttpServer};
22
use cloudevents::{EventBuilder, EventBuilderV10};
3-
use cloudevents_sdk_actix_web::{HttpResponseBuilderExt, RequestExt};
3+
use cloudevents_sdk_actix_web::{HttpResponseBuilderExt, HttpRequestExt};
44
use serde_json::json;
55

66
#[post("/")]
@@ -36,7 +36,7 @@ async fn main() -> std::io::Result<()> {
3636
HttpServer::new(|| {
3737
App::new()
3838
.wrap(actix_web::middleware::Logger::default())
39-
.wrap(actix_cors::Cors::new().finish())
39+
.wrap(actix_cors::Cors::permissive())
4040
.service(post_event)
4141
.service(get_event)
4242
})

0 commit comments

Comments
 (0)