mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
skip Nominatim lookups when the server has none configured
Add GET /api/geocode/status ({configured}), like /api/overpass/status. The outline client and the last-resort place search ask it once per page and send no lookup a server without a Nominatim endpoint would refuse, so a default install no longer logs a 503 on its first named landmark or grounds ask. An older server or a failed probe leaves the capability unknown and lookups proceed as before.
This commit is contained in:
1 parent
24228b145e
commit
f32ab5446b
10 files changed
+157
-6
No files matched your search
@@ -5298,6 +5298,11 @@ Google first when configured, Photon/OpenStreetMap as fallback (including Google
|
||||
transport failures or declined requests), and the local `/api/geocode` route
|
||||
over Nominatim as a last resort when neither answers and an operator explicitly
|
||||
configures `NOMINATIM_URL`. Unset, empty and invalid values disable Nominatim.
|
||||
`GET /api/geocode/status` answers `{configured}`; the browser asks once per
|
||||
page, and when Nominatim is not configured neither the last-resort search nor
|
||||
the voice outline client asks `/api/geocode`, so a default install sends no
|
||||
lookup it would refuse. A missing or failed probe leaves the capability unknown
|
||||
and lookups proceed as before.
|
||||
Explicit public-service configuration retains an identifying `User-Agent` and `Referer`, at
|
||||
least 1.1 seconds between public search and outline starts, a shared durable
|
||||
per-install daily allowance and pause state that fail closed when unusable.
|
||||
|
||||
Reference in new issue
Block a user