Harden DHMV WCS request headers
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-15 18:54:31 +02:00
parent daf9cef01b
commit 705dfad4f1
2 changed files with 29 additions and 1 deletions
@@ -279,7 +279,13 @@ class DhmvAcquisitionService:
@staticmethod
def _fetch(request_url: str, settings: Settings, opener: Callable[..., Any] | None = None) -> tuple[bytes, str]:
request = Request(request_url, headers={"User-Agent": "GeoIntel/0.1 bounded-dhmv-acquisition"})
request = Request(
request_url,
headers={
"Accept": "*/*",
"User-Agent": "GeoIntel/0.1 bounded-dhmv-acquisition",
},
)
max_bytes = settings.dhmv_max_response_mb * 1024 * 1024
try:
with (opener or urlopen)(request, timeout=settings.dhmv_timeout_seconds) as response: