Skip to content

Commit

Permalink
add PATCH to list of allowed HTTP methods in CORS (MSC4138)
Browse files Browse the repository at this point in the history
matrix-org/matrix-spec-proposals#4138

we already had HEAD

Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo committed May 6, 2024
1 parent a198f04 commit 11ec0df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 11ec0df

Please sign in to comment.