radicle-httpd: Add DELETE to allowed methods

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-02-09 16:48:48 +01:00
committed by Alexis Sellier
parent 61902ca47b
commit d88858e58b
+7 -1
View File
@@ -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]),
)
}