summaryrefslogtreecommitdiffstats
path: root/takahe
diff options
context:
space:
mode:
authorMichael Manfre2022-12-06 23:59:05 -0500
committerGitHub2022-12-06 21:59:05 -0700
commit39a40e4dae8da8b6e7072fcbee2fc745c27c016d (patch)
treeb8f149b4d232cd4f5598535ded61cfb7dd121e78 /takahe
parent126c7a14ecc89936ea5477d7baf1eb200da71f53 (diff)
downloadtakahe-39a40e4dae8da8b6e7072fcbee2fc745c27c016d.tar.gz
takahe-39a40e4dae8da8b6e7072fcbee2fc745c27c016d.tar.bz2
takahe-39a40e4dae8da8b6e7072fcbee2fc745c27c016d.zip
Set a Takahe User-Agent header for signed requests (#142)
Diffstat (limited to 'takahe')
-rw-r--r--takahe/settings.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/takahe/settings.py b/takahe/settings.py
index 981bb96..f508952 100644
--- a/takahe/settings.py
+++ b/takahe/settings.py
@@ -7,6 +7,7 @@ from typing import Literal
import dj_database_url
import django_cache_url
+import httpx
import sentry_sdk
from pydantic import AnyUrl, BaseSettings, EmailStr, Field, validator
from sentry_sdk.integrations.django import DjangoIntegration
@@ -354,3 +355,8 @@ CACHES = {"default": django_cache_url.parse(SETUP.CACHES_DEFAULT or "dummy://")}
if SETUP.ERROR_EMAILS:
ADMINS = [("Admin", e) for e in SETUP.ERROR_EMAILS]
+
+TAKAHE_USER_AGENT = (
+ f"python-httpx/{httpx.__version__} "
+ f"(Takahe/{__version__}; +https://{SETUP.MAIN_DOMAIN}/)"
+)