summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarpenter, Adam (CORP) <Adam.Carpenter@adp.com>2021-10-14 10:52:57 -0400
committerCarpenter, Adam (CORP) <Adam.Carpenter@adp.com>2021-10-14 10:52:57 -0400
commit2ebcc729ac791f05acf8f011494a26ce59a0f7ff (patch)
tree95a24e4a29cfc0578ea45fe83b9200d2de5ea6fc
parentf285fea69104de6952b96679b9de22d5bf9ffdb1 (diff)
downloadaltruistic-angelshark-2ebcc729ac791f05acf8f011494a26ce59a0f7ff.tar.xz
altruistic-angelshark-2ebcc729ac791f05acf8f011494a26ce59a0f7ff.zip
feat: allow any origin when ANGELSHARKD_ORIGIN is *
-rw-r--r--CHANGELOG3
-rw-r--r--Cargo.lock2
-rw-r--r--angelsharkd/Cargo.toml2
-rw-r--r--angelsharkd/src/main.rs2
4 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 6f4dde5..639fbf0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1,2 @@
-0.1.0: Initial release. \ No newline at end of file
+0.1.0: Initial release.
+0.1.1: ANGELSHARKD_ORIGIN accepts '*' to allow any origin. \ No newline at end of file
diff --git a/Cargo.lock b/Cargo.lock
index 54a14bb..ed91cff 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -24,7 +24,7 @@ dependencies = [
[[package]]
name = "angelsharkd"
-version = "0.1.0"
+version = "0.1.1"
dependencies = [
"anyhow",
"env_logger",
diff --git a/angelsharkd/Cargo.toml b/angelsharkd/Cargo.toml
index 9a5c750..e855789 100644
--- a/angelsharkd/Cargo.toml
+++ b/angelsharkd/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "angelsharkd"
-version = "0.1.0"
+version = "0.1.1"
edition = "2018"
authors = ["Adam T. Carpenter <adam.carpenter@adp.com>"]
description = "A HTTP interface into one or more Communication Managers"
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])