Skip to content

Commit

Permalink
fix(ckbtc): Drop Host header from https outcall request
Browse files Browse the repository at this point in the history
  • Loading branch information
ninegua committed Dec 11, 2024
1 parent fe723f1 commit c8863c1
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions rs/bitcoin/checker/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,10 @@ impl Provider {
fn btcscan_request(txid: Txid, max_response_bytes: u32) -> CanisterHttpRequestArgument {
let host = "btcscan.org";
let url = format!("https://{}/api/tx/{}/raw", host, txid);
let request_headers = vec![
HttpHeader {
name: "Host".to_string(),
value: format!("{host}:443"),
},
HttpHeader {
name: "User-Agent".to_string(),
value: "bitcoin_inputs_collector".to_string(),
},
];
let request_headers = vec![HttpHeader {
name: "User-Agent".to_string(),
value: "bitcoin_inputs_collector".to_string(),
}];
CanisterHttpRequestArgument {
url: url.to_string(),
method: HttpMethod::GET,
Expand All @@ -150,10 +144,7 @@ fn make_get_request(
BtcNetwork::Testnet => format!("https://{}/testnet/api/tx/{}/raw", host, txid),
BtcNetwork::Regtest { .. } => panic!("Request to regtest network requires POST"),
};
let request_headers = vec![HttpHeader {
name: "Host".to_string(),
value: format!("{host}:443"),
}];
let request_headers = vec![];
CanisterHttpRequestArgument {
url: url.to_string(),
method: HttpMethod::GET,
Expand Down

0 comments on commit c8863c1

Please sign in to comment.