Quellcode durchsuchen

fix: add Prefer header to CORS allowed headers (#1607)

The Prefer header is used by NUT-20 for long-polling support but was
being blocked by the CORS middleware. Add it to the allowed headers
list.
gudnuf vor 1 Monat
Ursprung
Commit
ed9d9e6d80
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      crates/cdk-axum/src/lib.rs

+ 1 - 1
crates/cdk-axum/src/lib.rs

@@ -167,7 +167,7 @@ async fn cors_middleware(
     req: axum::http::Request<axum::body::Body>,
     next: axum::middleware::Next,
 ) -> Response {
-    let allowed_headers = "Content-Type, Clear-auth, Blind-auth";
+    let allowed_headers = "Content-Type, Clear-auth, Blind-auth, Prefer";
 
     // Handle preflight requests
     if req.method() == axum::http::Method::OPTIONS {