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 <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-05-03 15:11:42 -04:00 committed by June
parent a198f0481a
commit 11ec0dff4f

View file

@ -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,