From 6d2aa1b88684af28af5ac2c6a18159e955c83391 Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 3 May 2024 15:11:42 -0400 Subject: [PATCH] add PATCH to list of allowed HTTP methods in CORS (MSC4138) https://github.com/matrix-org/matrix-spec-proposals/pull/4138 we already had HEAD Signed-off-by: strawberry --- src/router/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/router/mod.rs b/src/router/mod.rs index b612876a..03e8be60 100644 --- a/src/router/mod.rs +++ b/src/router/mod.rs @@ -131,9 +131,10 @@ fn request_result_log(method: &Method, uri: &Uri, result: &axum::response::Respo } fn cors_layer(_server: &Server) -> CorsLayer { - const METHODS: [Method; 6] = [ + const METHODS: [Method; 7] = [ Method::GET, Method::HEAD, + Method::PATCH, Method::POST, Method::PUT, Method::DELETE,