diff options
author | Carpenter, Adam (CORP) <Adam.Carpenter@adp.com> | 2021-10-14 10:52:57 -0400 |
---|---|---|
committer | Carpenter, Adam (CORP) <Adam.Carpenter@adp.com> | 2021-10-14 10:52:57 -0400 |
commit | 2ebcc729ac791f05acf8f011494a26ce59a0f7ff (patch) | |
tree | 95a24e4a29cfc0578ea45fe83b9200d2de5ea6fc /angelsharkd/src/main.rs | |
parent | f285fea69104de6952b96679b9de22d5bf9ffdb1 (diff) | |
download | altruistic-angelshark-2ebcc729ac791f05acf8f011494a26ce59a0f7ff.tar.xz altruistic-angelshark-2ebcc729ac791f05acf8f011494a26ce59a0f7ff.zip |
feat: allow any origin when ANGELSHARKD_ORIGIN is *
Diffstat (limited to 'angelsharkd/src/main.rs')
-rw-r--r-- | angelsharkd/src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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]) |