diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index cc990efca9..8564b2e48f 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -46,6 +46,7 @@ use windmill_queue::{get_queued_job, push, QueueTransaction}; pub fn workspaced_service() -> Router { let cors = CorsLayer::new() .allow_methods([http::Method::GET, http::Method::POST]) + .allow_headers([http::header::CONTENT_TYPE, http::header::AUTHORIZATION]) .allow_origin(Any); Router::new() diff --git a/backend/windmill-api/src/lib.rs b/backend/windmill-api/src/lib.rs index 22997bf202..34a76ccda1 100644 --- a/backend/windmill-api/src/lib.rs +++ b/backend/windmill-api/src/lib.rs @@ -24,7 +24,7 @@ use axum::extract::DefaultBodyLimit; use axum::{middleware::from_extractor, routing::get, Extension, Router}; use db::DB; use git_version::git_version; -use hyper::Method; +use hyper::{http, Method}; use mail_send::SmtpClientBuilder; use reqwest::Client; use std::{net::SocketAddr, sync::Arc}; @@ -185,6 +185,7 @@ pub async fn run_server( let cors = CorsLayer::new() .allow_methods([Method::GET, Method::POST]) + .allow_headers([http::header::CONTENT_TYPE, http::header::AUTHORIZATION]) .allow_origin(Any); #[cfg(feature = "enterprise")]