Skip to content

Commit e88337b

Browse files
committed
fix(http): CORS credentials incompatible with wildcard headers
1 parent 0b25869 commit e88337b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/http.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,11 @@ fn cors_layer(origins: &[String]) -> CorsLayer {
343343
CorsLayer::new()
344344
.allow_origin(origins)
345345
.allow_methods([Method::GET, Method::POST, Method::OPTIONS])
346-
.allow_headers(Any)
347-
.allow_credentials(true)
346+
.allow_headers([
347+
axum::http::header::AUTHORIZATION,
348+
axum::http::header::CONTENT_TYPE,
349+
axum::http::header::ACCEPT,
350+
])
348351
}
349352

350353
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)