Shorten User-Agent version to major.minor
This commit is contained in:
parent
759a517e0c
commit
d4a0191684
@ -35,8 +35,11 @@ class HttpRequest:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def default_headers(cls) -> Dict[str, str]:
|
def default_headers(cls) -> Dict[str, str]:
|
||||||
"""Return default headers for new requests."""
|
"""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 {
|
return {
|
||||||
"User-Agent": f"Roster/{constants.VERSION}"
|
"User-Agent": f"Roster/{short_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user