From 25859415172439e230da58085149f8eb0a9e3172 Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Fri, 25 Aug 2023 17:24:20 -0400 Subject: [PATCH] fix: explicitly allow OPTIONS requests on api routes --- graph-gateway/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph-gateway/src/main.rs b/graph-gateway/src/main.rs index 1fb02ab3..bc9cd83c 100644 --- a/graph-gateway/src/main.rs +++ b/graph-gateway/src/main.rs @@ -330,7 +330,7 @@ async fn main() { CorsLayer::new() .allow_origin(cors::Any) .allow_headers(cors::Any) - .allow_methods([http::Method::POST]), + .allow_methods([http::Method::OPTIONS, http::Method::POST]), ) .layer(middleware::from_fn(client_query::legacy_auth_adapter)), );