From d7376d9541d6feef53b611d8daf52e614b8484aa Mon Sep 17 00:00:00 2001 From: Nutomic Date: Fri, 1 Dec 2023 15:16:55 +0100 Subject: [PATCH] Fix cors_origin wildcard (fixes #4214) (#4221) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e99e9ce81..28dcaafe6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -326,7 +326,7 @@ fn cors_config(settings: &Settings) -> Cors { (Some(origin), false) => { // Need to call send_wildcard() explicitly, passing this into allowed_origin() results in error if cors_origin_setting.as_deref() == Some("*") { - Cors::default().send_wildcard() + Cors::default().allow_any_origin().send_wildcard() } else { Cors::default() .allowed_origin(&origin)