Upgrade 'actix-cors' crate to 0.5 version (#792)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: tyranron <tyranron@gmail.com>
This commit is contained in:
dependabot-preview[bot] 2020-10-20 12:57:14 +03:00 committed by GitHub
parent 421b343398
commit 3e4cf680e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 17 deletions

View file

@ -1,20 +1,19 @@
[package] [package]
name = "actix_subscriptions" name = "actix_subscriptions"
version = "0.1.0" version = "0.1.0"
authors = ["Mihai Dinculescu <mihai.dinculescu@outlook.com>"]
edition = "2018" edition = "2018"
authors = ["Mihai Dinculescu <mihai.dinculescu@outlook.com>"]
publish = false publish = false
[dependencies] [dependencies]
actix-web = "3.0.0" actix-web = "3.0"
actix-cors = "0.4.1" actix-cors = "0.5"
futures = "0.3"
futures = "0.3.5" tokio = { version = "0.2", features = ["macros", "rt-core"] }
tokio = { version = "0.2", features = ["rt-core", "macros"] } env_logger = "0.8"
env_logger = "0.8.1" serde = "1.0"
serde = "1.0.115" serde_json = "1.0"
serde_json = "1.0.57" rand = "0.7"
rand = "0.7.3"
juniper = { path = "../../juniper", features = ["expose-test-schema"] } juniper = { path = "../../juniper", features = ["expose-test-schema"] }
juniper_actix = { path = "../../juniper_actix", features = ["subscriptions"] } juniper_actix = { path = "../../juniper_actix", features = ["subscriptions"] }

View file

@ -115,11 +115,10 @@ async fn main() -> std::io::Result<()> {
.wrap(middleware::Compress::default()) .wrap(middleware::Compress::default())
.wrap(middleware::Logger::default()) .wrap(middleware::Logger::default())
.wrap( .wrap(
Cors::new() Cors::default()
.allowed_methods(vec!["POST", "GET"]) .allowed_methods(vec!["POST", "GET"])
.supports_credentials() .supports_credentials()
.max_age(3600) .max_age(3600),
.finish(),
) )
.service(web::resource("/subscriptions").route(web::get().to(subscriptions))) .service(web::resource("/subscriptions").route(web::get().to(subscriptions)))
.service( .service(

View file

@ -28,7 +28,7 @@ tokio = { version = "0.2", features = ["time"] }
[dev-dependencies] [dev-dependencies]
actix-rt = "1.1" actix-rt = "1.1"
actix-cors = "0.4" actix-cors = "0.5"
actix-identity = "0.3" actix-identity = "0.3"
juniper = { version = "0.14.2", path = "../juniper", features = ["expose-test-schema"] } juniper = { version = "0.14.2", path = "../juniper", features = ["expose-test-schema"] }

View file

@ -48,11 +48,10 @@ async fn main() -> std::io::Result<()> {
.wrap(middleware::Compress::default()) .wrap(middleware::Compress::default())
.wrap(middleware::Logger::default()) .wrap(middleware::Logger::default())
.wrap( .wrap(
Cors::new() Cors::default()
.allowed_methods(vec!["POST", "GET"]) .allowed_methods(vec!["POST", "GET"])
.supports_credentials() .supports_credentials()
.max_age(3600) .max_age(3600),
.finish(),
) )
.service( .service(
web::resource("/") web::resource("/")