diff --git a/examples/actix_subscriptions/Cargo.toml b/examples/actix_subscriptions/Cargo.toml index 0a793428..b91b5b9c 100644 --- a/examples/actix_subscriptions/Cargo.toml +++ b/examples/actix_subscriptions/Cargo.toml @@ -1,20 +1,19 @@ [package] name = "actix_subscriptions" version = "0.1.0" -authors = ["Mihai Dinculescu "] edition = "2018" +authors = ["Mihai Dinculescu "] publish = false [dependencies] -actix-web = "3.0.0" -actix-cors = "0.4.1" - -futures = "0.3.5" -tokio = { version = "0.2", features = ["rt-core", "macros"] } -env_logger = "0.8.1" -serde = "1.0.115" -serde_json = "1.0.57" -rand = "0.7.3" +actix-web = "3.0" +actix-cors = "0.5" +futures = "0.3" +tokio = { version = "0.2", features = ["macros", "rt-core"] } +env_logger = "0.8" +serde = "1.0" +serde_json = "1.0" +rand = "0.7" juniper = { path = "../../juniper", features = ["expose-test-schema"] } juniper_actix = { path = "../../juniper_actix", features = ["subscriptions"] } diff --git a/examples/actix_subscriptions/src/main.rs b/examples/actix_subscriptions/src/main.rs index 2c2c0d7f..08a78651 100644 --- a/examples/actix_subscriptions/src/main.rs +++ b/examples/actix_subscriptions/src/main.rs @@ -115,11 +115,10 @@ async fn main() -> std::io::Result<()> { .wrap(middleware::Compress::default()) .wrap(middleware::Logger::default()) .wrap( - Cors::new() + Cors::default() .allowed_methods(vec!["POST", "GET"]) .supports_credentials() - .max_age(3600) - .finish(), + .max_age(3600), ) .service(web::resource("/subscriptions").route(web::get().to(subscriptions))) .service( diff --git a/juniper_actix/Cargo.toml b/juniper_actix/Cargo.toml index 77a7647b..2a3059c9 100644 --- a/juniper_actix/Cargo.toml +++ b/juniper_actix/Cargo.toml @@ -28,7 +28,7 @@ tokio = { version = "0.2", features = ["time"] } [dev-dependencies] actix-rt = "1.1" -actix-cors = "0.4" +actix-cors = "0.5" actix-identity = "0.3" juniper = { version = "0.14.2", path = "../juniper", features = ["expose-test-schema"] } diff --git a/juniper_actix/examples/actix_server.rs b/juniper_actix/examples/actix_server.rs index ab32f315..5d9c59b5 100644 --- a/juniper_actix/examples/actix_server.rs +++ b/juniper_actix/examples/actix_server.rs @@ -48,11 +48,10 @@ async fn main() -> std::io::Result<()> { .wrap(middleware::Compress::default()) .wrap(middleware::Logger::default()) .wrap( - Cors::new() + Cors::default() .allowed_methods(vec!["POST", "GET"]) .supports_credentials() - .max_age(3600) - .finish(), + .max_age(3600), ) .service( web::resource("/")