Added allow credentials

This commit is contained in:
2025-03-17 22:32:00 +01:00
parent d62a8f7e06
commit 5f357d405b

View File

@@ -12,6 +12,7 @@ async fn options(app_state: Data<AppState>) -> impl Responder {
app_state.allow_origins.join(","), app_state.allow_origins.join(","),
)) ))
.append_header(("Access-Control-Allow-Methods", "GET, OPTIONS")) .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() .finish()
} }