diff options
| author | Dennis Fink | 2026-11-17 17:09:59 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 17:09:59 +0100 |
| commit | 6d6d079a3a99d3d3a922a640b6925eb2adf044de (patch) | |
| tree | 33cc19241f4ce86ea43b2f194087c58e3fdc8a4d /webmentions_ssg/config.py | |
| parent | 227092b57acc886469e16bcc4c0d3256e86d3d1e (diff) | |
| download | webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.tar.gz webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.zip | |
refactor(core)!: split forms and models by feature
Replace monolithic form and model modules with focused packages for
receiver, moderation, source, user, and shared validation concerns.
Rename source policy concepts to domain moderation, including routes,
models, tables, configuration, templates, and tests.
BREAKING CHANGE: form and model import paths, moderation routes, and
`SOURCE_ALLOWLIST_ENABLED` have changed; use `ALLOWLIST_ENABLED` and the
new feature-specific modules.
Diffstat (limited to 'webmentions_ssg/config.py')
| -rw-r--r-- | webmentions_ssg/config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webmentions_ssg/config.py b/webmentions_ssg/config.py index 576f376..28ab43d 100644 --- a/webmentions_ssg/config.py +++ b/webmentions_ssg/config.py @@ -54,9 +54,9 @@ class DefaultConfig: # Receiver # Empty by default: no target hostnames are accepted until configured. ALLOWED_TARGET_HOSTNAMES = frozenset() - # When enabled, only source domains listed in AllowedSource are accepted. - # Entries in BlockedSource always take precedence. - SOURCE_ALLOWLIST_ENABLED = False + # When enabled, only source domains listed in AllowedDomain are accepted. + # Entries in BlockedDomain always take precedence. + ALLOWLIST_ENABLED = False # Cap incoming HTTP request bodies (also applies to other Flask routes). MAX_CONTENT_LENGTH = 64 * 1024 # Independent UTF-8 byte limit for each submitted source/target URL. @@ -213,8 +213,8 @@ def validated_config_overrides( except (TypeError, ValueError) as exc: raise type(exc)(f"{key}: {exc}") from exc - if type(config["SOURCE_ALLOWLIST_ENABLED"]) is not bool: - raise ValueError("SOURCE_ALLOWLIST_ENABLED must be a boolean.") + if type(config["ALLOWLIST_ENABLED"]) is not bool: + raise ValueError("ALLOWLIST_ENABLED must be a boolean.") proxy_hops = config["PROXY_FIX_TRUSTED_HOPS"] if type(proxy_hops) is not int or proxy_hops < 0: |
