Shorten User-Agent version to major.minor

This commit is contained in:
Pavel Baksy 2026-01-15 00:52:05 +01:00
parent 759a517e0c
commit d4a0191684

View File

@ -35,8 +35,11 @@ class HttpRequest:
@classmethod
def default_headers(cls) -> Dict[str, str]:
"""Return default headers for new requests."""
# Use only major.minor version (without patch number)
version_parts = constants.VERSION.split(".")
short_version = ".".join(version_parts[:2])
return {
"User-Agent": f"Roster/{constants.VERSION}"
"User-Agent": f"Roster/{short_version}"
}
def to_dict(self):