From 0087a4b50c904018ece9fbc1bf1178ba9dea5cc9 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Thu, 9 Feb 2023 12:39:34 -0300 Subject: [PATCH] radicle-httpd: Add DELETE to allowed methods Signed-off-by: Sebastian Martinez --- radicle-httpd/src/api.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radicle-httpd/src/api.rs b/radicle-httpd/src/api.rs index 216786d9..cd819bc9 100644 --- a/radicle-httpd/src/api.rs +++ b/radicle-httpd/src/api.rs @@ -73,7 +73,13 @@ pub fn router(ctx: Context) -> Router { CorsLayer::new() .max_age(Duration::from_secs(86400)) .allow_origin(cors::Any) - .allow_methods([Method::GET, Method::POST, Method::PATCH, Method::PUT]) + .allow_methods([ + Method::GET, + Method::POST, + Method::PATCH, + Method::PUT, + Method::DELETE, + ]) .allow_headers([CONTENT_TYPE, AUTHORIZATION]), ) }