From eb236e891c9e7bf0ed3122b119b04f909fce2fb6 Mon Sep 17 00:00:00 2001 From: Celine Sarafa Date: Fri, 13 Oct 2023 15:46:37 +0200 Subject: [PATCH] fix: add cors on delete (#150) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a9c5d9d..89a67ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,7 +76,7 @@ pub async fn bootstrap( let cors_layer = CorsLayer::new() .allow_headers([http::header::CONTENT_TYPE]) .allow_origin("*".parse::().unwrap()) - .allow_methods([Method::GET, Method::POST]); + .allow_methods([Method::GET, Method::POST, Method::DELETE]); let app = Router::new() .route("/health", get(handlers::health::handler))