Skip to content

Commit

Permalink
Merge pull request #131 from ZhongFuze/graphdb/tigergraph
Browse files Browse the repository at this point in the history
[!] add x-api-key for proof_client
  • Loading branch information
ZhongFuze authored Apr 18, 2024
2 parents 48021e2 + 5c5b156 commit 40fd6e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/main.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ port = 3722

[upstream.proof_service]
url = "https://proof-service.next.id"
api_key = "x-api-key"

[upstream.aggregation_service]
url = "https://7x16bogxfb.execute-api.us-east-1.amazonaws.com/v1/identity/search"
Expand Down
1 change: 1 addition & 0 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub struct ConfigWeb {
#[derive(Clone, Deserialize, Default)]
pub struct ConfigProofService {
pub url: String,
pub api_key: String,
}

#[derive(Clone, Deserialize, Default)]
Expand Down
1 change: 1 addition & 0 deletions src/upstream/proof_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ async fn fetch_connections_by_platform_identity(
let req = hyper::Request::builder()
.method(Method::GET)
.uri(uri)
.header("x-api-key", C.upstream.proof_service.api_key.clone())
.body(Body::empty())
.map_err(|_err| Error::ParamError(format!("Proof Service Build Request Error {}", _err)))?;

Expand Down

0 comments on commit 40fd6e4

Please sign in to comment.