1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-08-31 11:26:59 +02:00

Fix allow_any_header setter (#121)

This commit is contained in:
Guarabot
2020-11-05 19:38:27 +01:00
committed by GitHub
parent 76429602c6
commit 0b2eff9384
3 changed files with 23 additions and 3 deletions

View File

@@ -234,12 +234,12 @@ impl Cors {
self
}
/// Resets allowed request header list to a state where any origin is accepted.
/// Resets allowed request header list to a state where any header is accepted.
///
/// See [`Cors::allowed_headers`] for more info on allowed request headers.
pub fn allow_any_header(mut self) -> Cors {
if let Some(cors) = cors(&mut self.inner, &self.error) {
cors.allowed_origins = AllOrSome::All;
cors.allowed_headers = AllOrSome::All;
}
self