We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9424fac commit d34d394Copy full SHA for d34d394
1 file changed
crates/rustapi-extras/src/cors/mod.rs
@@ -195,7 +195,7 @@ impl MiddlewareLayer for CorsLayer {
195
) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>> {
196
let origins = self.origins.clone();
197
let methods = self.methods_header_value();
198
- let allow_headers = if self.headers.iter().any(|value| value == "*") {
+ let allow_headers = if self.headers.len() == 1 && self.headers.first().map(|value| value == "*").unwrap_or(false) {
199
req.headers()
200
.get(header::ACCESS_CONTROL_REQUEST_HEADERS)
201
.and_then(|value| value.to_str().ok())
0 commit comments