From 8c6246c4f656d0d22032aa26a07f28eefa508566 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sun, 15 Dec 2024 16:55:33 +0100 Subject: [PATCH] [CHANGE] Set user agent according to MDN guidelines --- CHANGELOG.md | 4 ++++ aa_intel_tool/constants.py | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4ade7a7..99648e6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,10 @@ Section Order: ### Security --> +### Changed + +- Set user agent according to MDN guidelines + ## [2.5.2] - 2024-12-14 ### Added diff --git a/aa_intel_tool/constants.py b/aa_intel_tool/constants.py index 0d86e413..b6b0447b 100644 --- a/aa_intel_tool/constants.py +++ b/aa_intel_tool/constants.py @@ -6,9 +6,11 @@ import re # Django -from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ +# Alliance Auth +from esi import __version__ as esi_version + # AA Intel Tool import aa_intel_tool.parser.module.chatlist import aa_intel_tool.parser.module.dscan @@ -76,7 +78,6 @@ # Building our user agent for ESI calls -VERBOSE_NAME = "AA Intel Tool" -verbose_name_slugified: str = slugify(VERBOSE_NAME, allow_unicode=True) -github_url: str = "https://github.com/ppfeufer/aa-intel-tool" -USER_AGENT = f"{verbose_name_slugified} v{__version__} {github_url}" +APP_NAME = "aa-intel-tool" +GITHUB_URL = f"https://github.com/ppfeufer/{APP_NAME}" +USER_AGENT = f"{APP_NAME}/{__version__} ({GITHUB_URL}) via django-esi/{esi_version}"