aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/receiver.py
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/tasks/receiver.py')
-rw-r--r--webmentions_ssg/tasks/receiver.py10
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: