From 2ebcc729ac791f05acf8f011494a26ce59a0f7ff Mon Sep 17 00:00:00 2001 From: "Carpenter, Adam (CORP)" Date: Thu, 14 Oct 2021 10:52:57 -0400 Subject: feat: allow any origin when ANGELSHARKD_ORIGIN is * --- angelsharkd/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'angelsharkd/src') diff --git a/angelsharkd/src/main.rs b/angelsharkd/src/main.rs index 22e4161..8a8a53e 100644 --- a/angelsharkd/src/main.rs +++ b/angelsharkd/src/main.rs @@ -30,7 +30,7 @@ async fn main() -> Result<()> { let routes = routes::index() .or(routes::ossi(&config)) - .with(if config.debug_mode { + .with(if config.debug_mode || config.origin == "*" { warp::cors() .allow_any_origin() .allow_methods(&[Method::GET, Method::POST]) -- cgit v1.2.3