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 12:39:34 -03:00 committed by Alexis Sellier
parent ac812d7834
commit 0087a4b50c
No known key found for this signature in database
1 changed files with 7 additions and 1 deletions

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]),
)
}