Trek_CN/server
Maurice 005e0c109d fix(maps): make Overpass endpoints configurable and harden the POI search (#1309)
Builds on @Hardik-369's instance-specific User-Agent idea and reworks the rest
of the #1309 fix:

- keep the unique User-Agent (buildUserAgent) — a shared UA gets the public
  Overpass mirrors to rate-limit harder; it appends the configured instance
  URL and is applied to every Nominatim/Overpass/Wikimedia call
- add OVERPASS_URL so an operator behind locked-down egress (e.g. a Kubernetes
  cluster) can point the explore search at an internal/self-hosted Overpass
  instance instead of the public mirrors
- keep the per-endpoint timeout default at 12s but make it tunable via
  OVERPASS_TIMEOUT_MS for slow self-hosted instances; non-positive/invalid
  values fall back to the default rather than 502-ing every search at a 0ms cap
- log each endpoint's failure reason before the 502 so blocked egress is
  diagnosable instead of a bare "Overpass request failed"

Adds unit tests for the User-Agent, endpoint and timeout resolution plus the
all-mirrors-down path, and documents the two new env vars in .env.example, the
wiki and the Helm chart.
2026-06-27 20:14:52 +02:00
..
assets v3.1.1 bug fixes (#1228) 2026-06-18 20:13:30 +02:00
public v3.0.16 — bug fixes (#964) 2026-05-06 21:38:40 +02:00
scripts v3.1.1 bug fixes (#1228) 2026-06-18 20:13:30 +02:00
src fix(maps): make Overpass endpoints configurable and harden the POI search (#1309) 2026-06-27 20:14:52 +02:00
tests fix(maps): make Overpass endpoints configurable and harden the POI search (#1309) 2026-06-27 20:14:52 +02:00
.env.example fix(maps): make Overpass endpoints configurable and harden the POI search (#1309) 2026-06-27 20:14:52 +02:00
.gitignore Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00
.prettierrc Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00
eslint.config.mjs Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00
package.json chore: bump version to 3.1.2 [skip ci] 2026-06-23 19:24:13 +00:00
reset-admin.js Stabilize core: better-sqlite3, versioned migrations, graceful shutdown 2026-03-22 17:52:24 +01:00
tsconfig.build.json Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00
tsconfig.json Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00
vitest.config.ts Release 3.1.0 (#1185) 2026-06-16 22:22:45 +02:00