diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs index 0102034..240fd32 100644 --- a/server/src/api/mod.rs +++ b/server/src/api/mod.rs @@ -6,7 +6,10 @@ mod internal; pub mod jsonapi; mod tempo; -use axum::{Router, http::header::{ACCEPT, AUTHORIZATION}}; +use axum::{ + http::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE}, + Router, +}; use base::database::get_database; pub use error::Error; use eyre::Result; @@ -23,7 +26,7 @@ pub fn router() -> Result { let cors = CorsLayer::new() .allow_methods(Any) .allow_origin(Any) - .allow_headers([AUTHORIZATION, ACCEPT]); + .allow_headers([AUTHORIZATION, ACCEPT, CONTENT_TYPE]); let tracing = TraceLayer::new_for_http(); let conn = get_database()?.clone(); Ok(Router::new()