gendesign/backend/app
lekss361 4ace87af14 fix(cadastre): exact-match headers to nspd_lite to bypass NSPD WAF (#168)
Pilot v2 (job_id=2) failed 50/50 with HTTP 403 WAF block. Comparing
nspd_bulk_client.DEFAULT_HEADERS vs legacy nspd_lite.HEADERS (which works
on VPS IP since April 2026):

  PascalCase keys → lowercase keys
  Chrome/148 UA → Chrome/144 UA
  No cache-control / pragma → "no-cache" both
  accept-language ru first → en first
  No origin → "https://nspd.gov.ru"
  referer "/map" → "/map?thematic=PKK"

NSPD WAF (BotShield-class) likely fingerprints на header order + values
combined with TLS fingerprint. Matching legacy exactly minimizes deltas.

Test plan: retry pilot job after deploy, expect 0 WAF blocks for first
5 quarters.
2026-05-15 14:59:41 +03:00
..
api fix(parcels): _parse_floors handle int (post-migration #169 schema change) 2026-05-15 14:50:22 +03:00
core refactor(admin): extract _check_token into shared AdminTokenAuth dep (#133) 2026-05-14 23:45:44 +03:00
models feat(jobs): centralized job_settings API + DB-driven beat schedule 2026-05-11 15:38:13 +03:00
schemas feat(cadastre): NSPDBulkClient + schemas for bulk ingest (#168 PR2/5) (#170) 2026-05-15 12:50:41 +03:00
scrapers fix(cadastre): exact-match headers to nspd_lite to bypass NSPD WAF (#168) 2026-05-15 14:59:41 +03:00
services feat(cadastre): bulk_harvest worker + grid-walker + admin API (#168 PR3/5) (#171) 2026-05-15 13:31:32 +03:00
workers feat(cadastre): bulk_harvest worker + grid-walker + admin API (#168 PR3/5) (#171) 2026-05-15 13:31:32 +03:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py feat(cadastre): bulk_harvest worker + grid-walker + admin API (#168 PR3/5) (#171) 2026-05-15 13:31:32 +03:00