Include OS in theseus User-Agent (#5046)

This commit is contained in:
François-Xavier Talbot
2026-01-07 21:11:18 -05:00
committed by GitHub
parent a1d9268d00
commit 17db55a0bc
3 changed files with 14 additions and 9 deletions

View File

@@ -26,8 +26,13 @@ pub use event::{
pub use logger::start_logger;
pub use state::State;
pub const LAUNCHER_USER_AGENT: &str = concat!(
"modrinth/theseus/",
env!("CARGO_PKG_VERSION"),
" (support@modrinth.com)"
);
pub fn launcher_user_agent() -> String {
const LAUNCHER_BASE_USER_AGENT: &str =
concat!("modrinth/theseus/", env!("CARGO_PKG_VERSION"),);
format!(
"{} ({}; support@modrinth.com)",
LAUNCHER_BASE_USER_AGENT,
std::env::consts::OS
)
}