diff options
| author | Dennis Fink | 2026-10-25 22:26:40 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-25 22:26:40 +0100 |
| commit | ce802830c37565d325ba2ecc060443550abb1955 (patch) | |
| tree | b2cdf65353b1eb28d2c8d394b0dcd24461c4db6c /webmentions_ssg/forms/validators.py | |
| parent | a231913ab273f427697f2d27d615b495f6e160bb (diff) | |
| download | webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.tar.gz webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.zip | |
refactor(core): simplify configuration keys
Remove the WEBMENTIONS_SSG prefix from application-specific
configuration settings and update validators, tasks, and tests to use
the shorter names.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/forms/validators.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/webmentions_ssg/forms/validators.py b/webmentions_ssg/forms/validators.py index 761dc46..990d91a 100644 --- a/webmentions_ssg/forms/validators.py +++ b/webmentions_ssg/forms/validators.py @@ -83,10 +83,7 @@ class AllowedHostname: :param field: Field containing the URL to validate. :raises ValidationError: If the URL hostname is not configured as allowed. """ - if ( - urlsplit(field.data).hostname - in current_app.config["WEBMENTIONS_SSG_ALLOWED_HOSTNAMES"] - ): + if urlsplit(field.data).hostname in current_app.config["ALLOWED_HOSTNAMES"]: return raise ValidationError(self.message or field.gettext("Invalid input.")) |
