From 0ebf7b6214dcec68a05473199d9806ea1d703cb5 Mon Sep 17 00:00:00 2001 From: mpostma Date: Fri, 29 May 2020 22:16:42 +0200 Subject: [PATCH] fix CORS config error in actix --- meilisearch-http/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/main.rs b/meilisearch-http/src/main.rs index 0ede01bbb..d7edcce6d 100644 --- a/meilisearch-http/src/main.rs +++ b/meilisearch-http/src/main.rs @@ -69,8 +69,8 @@ async fn main() -> Result<(), MainError> { .wrap( Cors::new() .send_wildcard() - .allowed_header("x-meili-api-key") - //.max_age(86_400) // 24h + .allowed_headers(vec!["content-type","x-meili-api-key"]) + .max_age(86_400) // 24h .finish(), ) .wrap(middleware::Logger::default())