mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 10:27:42 +02:00
fix expose all headers (#273)
* fix expose all headers * update changelog
This commit is contained in:
@ -315,7 +315,7 @@ impl Cors {
|
||||
self
|
||||
}
|
||||
|
||||
/// Resets exposed response header list to a state where any header is accepted.
|
||||
/// Resets exposed response header list to a state where all headers are exposed.
|
||||
///
|
||||
/// See [`Cors::expose_headers`] for more info on exposed response headers.
|
||||
pub fn expose_any_header(mut self) -> Cors {
|
||||
|
@ -121,10 +121,9 @@ impl<S> CorsMiddleware<S> {
|
||||
.insert(header::ACCESS_CONTROL_EXPOSE_HEADERS, expose.clone());
|
||||
} else if matches!(inner.expose_headers, AllOrSome::All) {
|
||||
// intersperse_header_values requires that argument is non-empty
|
||||
if !res.request().headers().is_empty() {
|
||||
if !res.headers().is_empty() {
|
||||
// extract header names from request
|
||||
let expose_all_request_headers = res
|
||||
.request()
|
||||
.headers()
|
||||
.keys()
|
||||
.into_iter()
|
||||
|
Reference in New Issue
Block a user