fix(cadastre): NSPDBulkClient verify=False for NSPD self-signed CA chain (#168) #175
1 changed files with 6 additions and 0 deletions
|
|
@ -114,10 +114,16 @@ class NSPDBulkClient:
|
||||||
self._client: httpx.AsyncClient | None = None
|
self._client: httpx.AsyncClient | None = None
|
||||||
|
|
||||||
async def __aenter__(self) -> NSPDBulkClient:
|
async def __aenter__(self) -> NSPDBulkClient:
|
||||||
|
# NSPD prod chain contains a self-signed/internal CA on Beget VPS →
|
||||||
|
# default verify trips CERTIFICATE_VERIFY_FAILED. Existing legacy
|
||||||
|
# client (app.services.scrapers.nspd_lite) uses unverified context
|
||||||
|
# for the same reason — reuse pattern. Risk OK: public gov data,
|
||||||
|
# no sensitive payload, X-Admin-Token не уходит к NSPD.
|
||||||
self._client = httpx.AsyncClient(
|
self._client = httpx.AsyncClient(
|
||||||
headers=self._headers,
|
headers=self._headers,
|
||||||
timeout=self._timeout,
|
timeout=self._timeout,
|
||||||
follow_redirects=True,
|
follow_redirects=True,
|
||||||
|
verify=False,
|
||||||
)
|
)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue