mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
web3Signer: set header "Accept: application/json" as we expect json in the response (#5692)
* web3Signer: set header "Accept: application/json" as we expect json in 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> * fixup! web3Signer: set header "Accept: application/json" as we expect json in the response
This commit is contained in:
@@ -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::{header::ACCEPT, Client};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use task_executor::TaskExecutor;
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user