Skip to content

Commit

Permalink
web3Signer: set header "Accept: application/json" as we expect json i…
Browse files Browse the repository at this point in the history
…n the response

The web3signer handler in lighthouse requires a json response.
Setting the header "Accept: application/json" indicates to the web3signer that json is an acceptable response.

Signed-off-by: Lukas Rusak <lorusak@gmail.com>
  • Loading branch information
lrusak committed May 2, 2024
1 parent c8ffafb commit 8965009
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion validator_client/src/signing_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::http_metrics::metrics;
use eth2_keystore::Keystore;
use lockfile::Lockfile;
use parking_lot::Mutex;
use reqwest::Client;
use reqwest::{Client, header::ACCEPT};
use std::path::PathBuf;
use std::sync::Arc;
use task_executor::TaskExecutor;
Expand Down Expand Up @@ -243,6 +243,7 @@ impl SigningMethod {
// Request a signature from the Web3Signer instance via HTTP(S).
let response: SigningResponse = http_client
.post(signing_url.clone())
.header(ACCEPT, "application/json")
.json(&request)
.send()
.await
Expand Down

0 comments on commit 8965009

Please sign in to comment.