mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
fix(places): make no-store the default and refuse an unreadable Places 200
Every Google route now sets no-store right after the same-site gate and switches to private, max-age=300 only on a confirmed answer, so the proxy's own 400, 405, 429 and 502 replies are no longer left without a header. Both Places routes answer an unreadable 200 body with 502 instead of caching an empty result, as the geocode routes already did. The test pins the allowlist with OVER_DAILY_LIMIT and UNKNOWN_ERROR and covers the unreadable and empty Places bodies; the changelog fragment is shorter.
This commit is contained in:
1 parent
f22701ae70
commit
31b6b25d8b
4 files changed
+103
-35
No files matched your search
@@ -5996,7 +5996,7 @@ apply to `public/` assets or built-preview serving.
|
||||
- `AISSTREAM_API_KEY` is server-side only; the browser reads the same-origin `/api/vessels` cache.
|
||||
- `/api/google/nearby-places` keeps the Google key out of Places requests issued for voice scene context.
|
||||
- `/api/google/text-search` keeps the Google key server-side for view-biased Places recovery used by annotation resolution.
|
||||
- The two Places routes and both geocode routes let the browser keep an answer for five minutes (`private, max-age=300`), but a refusal is `no-store`: a Places error status, or a Geocoding status other than `OK` or `ZERO_RESULTS` (Google sends `REQUEST_DENIED` and `OVER_QUERY_LIMIT` as HTTP 200). A denied or exhausted key is not replayed from the browser cache after it is fixed.
|
||||
- The two Places routes and both geocode routes let the browser keep an answer for five minutes (`private, max-age=300`), and everything else is `no-store`: a Places error status or unreadable body, a Geocoding status other than `OK` or `ZERO_RESULTS` (Google sends `REQUEST_DENIED` and `OVER_QUERY_LIMIT` as HTTP 200), and the proxy's own 400, 405, 429 and 502 replies. A denied or exhausted key is not replayed from the browser cache after it is fixed.
|
||||
- `/api/overpass` is bounded by body/response caps, per-client/global rate limits, concurrency limits, operator-configured upstreams, in-flight dedupe, cache bounds, and static validation that every selector is spatially bounded.
|
||||
- `/api/military-installations` uses an independent limiter with the same 90-per-client/300-global one-minute bounds, so viewport installation refreshes never consume `/api/overpass` annotation capacity.
|
||||
- `/api/route` proxies bounded OSRM route requests for annotation routes, with profile allowlisting, distance caps, response caps, caching, and sanitized "no route found" errors.
|
||||
|
||||
Reference in new issue
Block a user