Merge pull request 'fix(tradein): verify=False для WFS геопортала ЕКБ (российский CA-серт)' (#1788) from fix/tradein-ekb-geoportal-ssl-verify into main
Some checks are pending
Deploy Trade-In / build-browser (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / test (push) Blocked by required conditions
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / changes (push) Successful in 6s
Some checks are pending
Deploy Trade-In / build-browser (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / test (push) Blocked by required conditions
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / changes (push) Successful in 6s
Reviewed-on: #1788
This commit is contained in:
commit
fb7b3323e4
1 changed files with 6 additions and 1 deletions
|
|
@ -220,7 +220,12 @@ class EkbGeoportalClient:
|
||||||
}
|
}
|
||||||
url = f"{GEOPORTAL_HOST}{WFS_PATH}"
|
url = f"{GEOPORTAL_HOST}{WFS_PATH}"
|
||||||
try:
|
try:
|
||||||
async with httpx.AsyncClient(timeout=self._timeout, headers=_BROWSER_HEADERS) as client:
|
# Геопортал ЕКБ отдаёт сертификат российского CA (Минцифры), которого нет в
|
||||||
|
# стандартном trust store httpx → TLS verify падает. Данные публичные,
|
||||||
|
# read-only → verify=False (тот же подход, что curl -k при разведке).
|
||||||
|
async with httpx.AsyncClient(
|
||||||
|
timeout=self._timeout, headers=_BROWSER_HEADERS, verify=False
|
||||||
|
) as client:
|
||||||
resp = await client.get(url, params=params)
|
resp = await client.get(url, params=params)
|
||||||
if resp.status_code != 200:
|
if resp.status_code != 200:
|
||||||
logger.warning("geoportal WFS → HTTP %d for bbox=%s", resp.status_code, bbox)
|
logger.warning("geoportal WFS → HTTP %d for bbox=%s", resp.status_code, bbox)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue