From 514cd8e389aa8fea6ae92118b32bf4ee6dd3090c Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 7 May 2025 14:50:03 +0200 Subject: [PATCH] Allow the X-Requested-With header in CORS on the OAuth endpoints --- crates/handlers/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/handlers/src/lib.rs b/crates/handlers/src/lib.rs index 5b8a5e48a..36028cb3e 100644 --- a/crates/handlers/src/lib.rs +++ b/crates/handlers/src/lib.rs @@ -249,6 +249,8 @@ where ACCEPT_LANGUAGE, CONTENT_LANGUAGE, CONTENT_TYPE, + // Swagger will send this header, so we have to allow it to avoid CORS errors + HeaderName::from_static("x-requested-with"), ]) .max_age(Duration::from_secs(60 * 60)), )