From 044dbb033362490c7dfadb08ca40c9bacce91048 Mon Sep 17 00:00:00 2001 From: mpostma Date: Wed, 9 Dec 2020 12:44:02 +0100 Subject: [PATCH] bump actix cors --- Cargo.lock | 8 +++++--- meilisearch-http/Cargo.toml | 2 +- meilisearch-http/src/main.rs | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eca4d66ca..c3cf11c7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,14 +40,16 @@ dependencies = [ [[package]] name = "actix-cors" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e5c769e4d332bfad27f11b8139b5818c4bbddb02c385b8f16344d93ff1a8eb" +checksum = "3f3a3d5493dbc9b8769fe88c030d057ef8d2edc5728e5e26267780e8fc5db0be" dependencies = [ - "actix-service", "actix-web", "derive_more", "futures-util", + "log", + "once_cell", + "tinyvec 1.0.1", ] [[package]] diff --git a/meilisearch-http/Cargo.toml b/meilisearch-http/Cargo.toml index e792e97fd..f8b52a30d 100644 --- a/meilisearch-http/Cargo.toml +++ b/meilisearch-http/Cargo.toml @@ -17,7 +17,7 @@ path = "src/main.rs" default = ["sentry"] [dependencies] -actix-cors = "0.4.1" +actix-cors = "0.5.3" actix-http = "2" actix-rt = "1" actix-service = "1.0.6" diff --git a/meilisearch-http/src/main.rs b/meilisearch-http/src/main.rs index e5d5339df..800e2760c 100644 --- a/meilisearch-http/src/main.rs +++ b/meilisearch-http/src/main.rs @@ -84,11 +84,10 @@ async fn main() -> Result<(), MainError> { let http_server = HttpServer::new(move || { create_app(&data, enable_frontend) .wrap( - Cors::new() + Cors::default() .send_wildcard() .allowed_headers(vec!["content-type", "x-meili-api-key"]) .max_age(86_400) // 24h - .finish(), ) .wrap(middleware::Logger::default()) .wrap(middleware::Compress::default())