Skip to content

Commit

Permalink
Merge pull request #28438 from ProvableHQ/fix/headers
Browse files Browse the repository at this point in the history
[Fix] Update HTTP headers in Leo CLI.
  • Loading branch information
d0cd authored Nov 7, 2024
2 parents 180bd99 + fe856e2 commit 0178e67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion leo/cli/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ fn handle_broadcast<N: Network>(endpoint: &String, transaction: Transaction<N>,
.redirects(0)
.build()
.post(endpoint)
.set(&format!("X-Aleo-Leo-{}", env!("CARGO_PKG_VERSION")), "true")
.set("X-Leo-Version", env!("CARGO_PKG_VERSION"))
.send_json(&transaction)
.map_err(|err| CliError::broadcast_error(err.to_string()))?;
match response.status() {
Expand Down
2 changes: 1 addition & 1 deletion utils/retriever/src/retriever/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ pub fn fetch_from_network(url: &str) -> Result<String, UtilError> {
.redirects(0)
.build()
.get(url)
.set(&format!("X-Aleo-Leo-{}", env!("CARGO_PKG_VERSION")), "true")
.set("X-Leo-Version", env!("CARGO_PKG_VERSION"))
.call()
.map_err(|err| UtilError::failed_to_retrieve_from_endpoint(err, Default::default()))?;
match response.status() {
Expand Down

0 comments on commit 0178e67

Please sign in to comment.