Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c04b4e8da5 | ||
|
|
69dd1ba156 | ||
|
|
65c964b329 |
@@ -38,7 +38,7 @@ default = ["local_trigger"]
|
||||
local_trigger = []
|
||||
|
||||
[dependencies]
|
||||
axum = { version = "0.7.5", default-features = false, features = ["tokio", "http1", "http2", "json"] }
|
||||
axum = { version = "0.7.5", default-features = false, features = ["tokio", "http1", "json"] }
|
||||
base64 = "0.22.1"
|
||||
hmac = "0.12.1"
|
||||
http-body-util = "0.1.2"
|
||||
|
||||
@@ -63,7 +63,6 @@ pub async fn launch_server() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.collect();
|
||||
tracing::debug!("Using repo whitelist: {:?}", allowed_repos);
|
||||
|
||||
let allowed_repos = HashSet::new();
|
||||
let app = Router::new()
|
||||
.route("/hook", post(hook))
|
||||
.layer(middleware::from_fn(verify_signature))
|
||||
@@ -98,7 +97,7 @@ pub async fn local_trigger(payload: &str) -> Result<(), Box<dyn std::error::Erro
|
||||
|
||||
let allowed_repos = std::env::var("WEBHOOK_BRIDGE_REPO_WHITELIST")
|
||||
.ok()
|
||||
.unwrap_or_else(String::new);
|
||||
.unwrap_or_default();
|
||||
let allowed_repos: HashSet<_> = allowed_repos
|
||||
.split(",")
|
||||
.filter(|s| !s.is_empty())
|
||||
|
||||
Reference in New Issue
Block a user