Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

docs(street-level): the proxy adds the token to tile requests and refuses redirects

German Khokhlovbd57cf5f43d6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8af764de6..744451e76 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,9 +77,10 @@
and an embedded viewer with full-screen EXPAND and FIT/FILL. Coverage lines
(below 60 km) and image cones drape on the terrain and Google 3D tiles;
opening a photo frames it with one camera flight. Share links carry the
- switch, the filters and the panel's collapsed state. A server proxy keeps
- the token server-side, trims coverage tiles and caches them in memory for
- 24 h; it refuses cross-site requests and rate-limits per IP. The panel reads
+ switch, the filters and the panel's collapsed state. A server proxy adds the
+ token to coverage-tile requests, trims the tiles and caches them in memory
+ for 24 h; it refuses cross-site requests and upstream redirects, rate-limits
+ per IP and runs at most six Mapillary fetches at once. The panel reads
KEY REQUIRED without a token and KEY REJECTED when Mapillary refuses it.
- Add Norway's road cameras from Statens vegvesen as a CCTV pack. The camera
diff --git a/SECURITY.md b/SECURITY.md
index 2b449e115..902028996 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -28,7 +28,7 @@ These are designed to be used directly in the browser (like a Mapbox public toke
1. **Google Maps API key** — loads Photorealistic 3D Tiles directly and powers GEV place search. **Restrict it** (HTTP referrer + API restriction to the required Google APIs) in the Google Cloud Console. An unrestricted key in a public deployment can be abused and billed to you.
2. **Cesium ion token** (`CESIUM_ION_TOKEN`, optional — for ion-hosted Google Photorealistic 3D Tiles, Bing world imagery, and world terrain) — used as `Cesium.Ion.defaultAccessToken` client-side. Use a public **`assets:read`** token with **URL restrictions** for any hosted deployment. The Community plan has eligibility and usage limits; a public token is not a secret, but it can still consume the account's quota.
-3. **Mapillary client token** (`MAPILLARY_CLIENT_TOKEN`, optional, Street Level) — used by the MapillaryJS viewer and Graph API lookups in the browser, and by the server's coverage-tile proxy, which sends it only to `tiles.mapillary.com` over HTTPS (redirects are followed by hand and pinned to that origin) and caches tiles in memory only. Mapillary client tokens are meant for browser use.
+3. **Mapillary client token** (`MAPILLARY_CLIENT_TOKEN`, optional, Street Level) — used by the MapillaryJS viewer and Graph API lookups in the browser, and by the server's coverage-tile proxy, which sends it only to `tiles.mapillary.com` over HTTPS (an upstream redirect is refused and answered 502, never followed) and caches tiles in memory only. Mapillary client tokens are meant for browser use.
> The explicit browser `define` block in `build/vite.js` controls exactly what reaches the client: only these three keys. Everything else stays server-side.
diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md
index 667324ec8..5a109975f 100644
--- a/docs/CURRENT-STATE.md
+++ b/docs/CURRENT-STATE.md
@@ -3045,10 +3045,11 @@ reads KEY REQUIRED, says which key to add and disables the filters; a rejected
key reads KEY REJECTED and stops tile requests until the layer goes off; a 429
pauses them for its Retry-After.
-The server proxy (`server/providers/mapillary.js`) keeps the token server-side,
-serves only z11–14 coverage, refuses upstream redirects, strips the unused
-`image` layer, coalesces concurrent requests and keeps tiles in a 24 h memory
-cache.
+The server proxy (`server/providers/mapillary.js`) adds the token to
+coverage-tile requests (the browser holds it too, for MapillaryJS and the Graph
+API), serves only z11–14 coverage, refuses upstream redirects, strips the
+unused `image` layer, coalesces concurrent requests, runs at most six Mapillary
+fetches at once and keeps tiles in a 24 h memory cache.
MapillaryJS loads on the first photo. Opening one frames it with a single
camera flight through the application's deferred navigation (`begin` /