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/tasks/receiver.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 'webmentions_ssg/tasks/receiver.py')
| -rw-r--r-- | webmentions_ssg/tasks/receiver.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/webmentions_ssg/tasks/receiver.py b/webmentions_ssg/tasks/receiver.py index e99eea3..8c9c05a 100644 --- a/webmentions_ssg/tasks/receiver.py +++ b/webmentions_ssg/tasks/receiver.py @@ -137,11 +137,9 @@ def fetch_source(source_url: str) -> tuple[httpx.Response, bytes]: "Accept": "text/html, application/xhtml+xml;q=0.9, text/plain;q=0.8", "User-Agent": f"{APP_NAME}/{VERSION} ReceivedWebmention", }, - timeout=httpx.Timeout( - current_app.config.get("WEBMENTIONS_SSG_REQUEST_TIMEOUT", 5.0) - ), + timeout=httpx.Timeout(current_app.config.get("REQUEST_TIMEOUT", 5.0)), follow_redirects=True, - max_redirects=current_app.config.get("WEBMENTIONS_SSG_MAX_REDIRECTS", 20), + max_redirects=current_app.config.get("MAX_REDIRECTS", 20), trust_env=False, event_hooks={"request": [ensure_public_request]}, ) as client, @@ -158,9 +156,7 @@ def fetch_source(source_url: str) -> tuple[httpx.Response, bytes]: else: raise VerificationError(f"Source returned HTTP {status}") - max_source_bytes = current_app.config.get( - "WEBMENTIONS_SSG_MAX_SOURCE_BYTES", 1_000_000 - ) + max_source_bytes = current_app.config.get("MAX_SOURCE_BYTES", 1_000_000) if (content_length := response.headers.get("Content-Length")) is not None: try: |
