Skip to content

Commit 514cd8e

Browse files
committed
Allow the X-Requested-With header in CORS on the OAuth endpoints
1 parent c326d76 commit 514cd8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/handlers/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ where
249249
ACCEPT_LANGUAGE,
250250
CONTENT_LANGUAGE,
251251
CONTENT_TYPE,
252+
// Swagger will send this header, so we have to allow it to avoid CORS errors
253+
HeaderName::from_static("x-requested-with"),
252254
])
253255
.max_age(Duration::from_secs(60 * 60)),
254256
)

0 commit comments

Comments
 (0)