feat: add base url in order to properly do URLs in e-mails

This commit is contained in:
2025-07-11 16:53:01 +02:00
parent e99798ba5c
commit 8a691d59e7
2 changed files with 7 additions and 3 deletions

View File

@@ -145,6 +145,10 @@ MEDIA_URL = config.get("urls", "media", fallback="/media/")
# Take all three into account when modifying
host = config.get("notfellchen", "host", fallback='*')
# The base URL will be used to build URLS
# See https://forum.djangoproject.com/t/putting-full-url-link-on-email-how-to-get-current-domain-name-to-put-on-url/13806/3
base_url = config.get("notfellchen", "base_url", fallback=f"https://{host}")
# see https://docs.djangoproject.com/en/3.2/ref/settings/#std-setting-ALLOWED_HOSTS
ALLOWED_HOSTS = [host]
CSRF_TRUSTED_ORIGINS = [f"https://{host}"]