From cf970ee09150c4b089c7e75609604f1c9e5ee845 Mon Sep 17 00:00:00 2001 From: Julian Tescher Date: Thu, 31 Dec 2020 04:13:36 -0800 Subject: [PATCH] Fix expose_any_header setter (#143) --- actix-cors/CHANGES.md | 2 ++ actix-cors/src/builder.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/actix-cors/CHANGES.md b/actix-cors/CHANGES.md index 58b2c7a0c..e0f4af308 100644 --- a/actix-cors/CHANGES.md +++ b/actix-cors/CHANGES.md @@ -1,7 +1,9 @@ # Changes ## Unreleased - 2020-xx-xx +* Fix `expose_any_header` method, now set the correct field. [#143] +[#143]: https://github.com/actix/actix-extras/pull/143 ## 0.5.3 - 2020-11-19 * Fix version spec for `derive_more` dependency. diff --git a/actix-cors/src/builder.rs b/actix-cors/src/builder.rs index 218fc63a6..534c73fd8 100644 --- a/actix-cors/src/builder.rs +++ b/actix-cors/src/builder.rs @@ -318,7 +318,7 @@ impl Cors { /// See [`Cors::expose_headers`] for more info on exposed response headers. pub fn expose_any_header(mut self) -> Cors { if let Some(cors) = cors(&mut self.inner, &self.error) { - cors.allowed_origins = AllOrSome::All; + cors.expose_headers = AllOrSome::All; } self