Skip to content

Commit

Permalink
Add User-Agent to deploy requests
Browse files Browse the repository at this point in the history
  • Loading branch information
pierd committed Sep 1, 2023
1 parent b759959 commit b43827e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/deploy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository = "https://github.com/AmbientRun/Ambient"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ambient_native_std = { path = "../native_std" , version = "0.3.0-dev" }
ambient_package = { path = "../../shared_crates/package" , version = "0.3.0-dev" }
ambient_std = { path = "../../shared_crates/std" , version = "0.3.0-dev" }
ambient_sys = { path = "../sys" , version = "0.3.0-dev" }
Expand Down
4 changes: 3 additions & 1 deletion crates/deploy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::{
str::FromStr,
};

use ambient_native_std::RUNTIME_USER_AGENT;
use ambient_package::Manifest;
use md5::Digest;
use tokio_stream::StreamExt;
Expand Down Expand Up @@ -220,7 +221,8 @@ async fn create_client(

// set up the endpoint and connect
let channel = {
let mut endpoint = Channel::from_shared(api_server.to_owned())?;
let mut endpoint =
Channel::from_shared(api_server.to_owned())?.user_agent(RUNTIME_USER_AGENT)?;
if let Some(tls) = tls {
endpoint = endpoint.tls_config(tls)?
}
Expand Down

0 comments on commit b43827e

Please sign in to comment.