diff options
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/config.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webmentions_ssg/config.py b/webmentions_ssg/config.py index 3d05e5d..514432a 100644 --- a/webmentions_ssg/config.py +++ b/webmentions_ssg/config.py @@ -236,6 +236,16 @@ def validated_config_overrides( except (TypeError, ValueError) as exc: raise type(exc)(f"{key}: {exc}") from exc + # Digests are rendered from a background worker without a request host. + # Require a public hostname at startup instead of silently omitting links. + if config.get("DIGEST_EMAIL") and not ( + isinstance(config.get("SERVER_NAME"), str) and config["SERVER_NAME"].strip() + ): + raise RuntimeError( + "Configure SERVER_NAME for the Webmentions SSG admin interface " + "when DIGEST_EMAIL is enabled." + ) + if type(config["ALLOWLIST_ENABLED"]) is not bool: raise ValueError("ALLOWLIST_ENABLED must be a boolean.") |
