From 5f357d405be3e226709ca24e6597a8d1f9dc6df1 Mon Sep 17 00:00:00 2001 From: AINDUSTRIES Date: Mon, 17 Mar 2025 22:32:00 +0100 Subject: [PATCH] Added allow credentials --- src/utils.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 06fa592..1b9b7f4 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -12,6 +12,7 @@ async fn options(app_state: Data) -> impl Responder { app_state.allow_origins.join(","), )) .append_header(("Access-Control-Allow-Methods", "GET, OPTIONS")) - .append_header(("Access-Control-Allow-Headers", "Content-Type")) + .append_header(("Access-Control-Allow-Headers", "Content-Type, Authorization")) + .append_header(("Access-Control-Allow-Credentials", "true")) .finish() }