diff --git a/tvix/glue/src/fetchers/mod.rs b/tvix/glue/src/fetchers/mod.rs index 035e9f11a..7050ad48f 100644 --- a/tvix/glue/src/fetchers/mod.rs +++ b/tvix/glue/src/fetchers/mod.rs @@ -178,8 +178,6 @@ pub struct Fetcher { nar_calculation_service: NS, } -const USER_AGENT: &str = concat!("Tvix/", env!("CARGO_PKG_VERSION")); - impl Fetcher { pub fn new( blob_service: BS, @@ -189,7 +187,7 @@ impl Fetcher { ) -> Self { Self { http_client: reqwest::Client::builder() - .user_agent(USER_AGENT) + .user_agent(crate::USER_AGENT) .build() .expect("Client::new()"), blob_service, diff --git a/tvix/glue/src/lib.rs b/tvix/glue/src/lib.rs index 320d1f6fe..8f72424d5 100644 --- a/tvix/glue/src/lib.rs +++ b/tvix/glue/src/lib.rs @@ -7,6 +7,9 @@ pub mod tvix_store_io; mod fetchurl; +// Used as user agent in various HTTP Clients +const USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); + #[cfg(test)] mod tests;