From a8cb2e672a26254d4ff0c860fda09226470f320e Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 20 Jun 2026 22:58:23 +0200 Subject: [PATCH] fix(atlas): give the country-GeoJSON fetch a longer timeout (#1254) The gzipped admin0 GeoJSON is still a few MB, so behind a slow reverse proxy or Cloudflare Tunnel it could exceed the global 8s axios timeout and abort, leaving the map with no countries. It now gets a 30s per-request timeout, matching the existing /maps/pois exception. --- client/src/pages/atlas/useAtlas.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/pages/atlas/useAtlas.ts b/client/src/pages/atlas/useAtlas.ts index ce2a9e7b..af79169b 100644 --- a/client/src/pages/atlas/useAtlas.ts +++ b/client/src/pages/atlas/useAtlas.ts @@ -134,9 +134,12 @@ export function useAtlas() { }, []) // Load country-border GeoJSON from our API (geoBoundaries, served server-side — - // no third-party fetch from the browser). + // no third-party fetch from the browser). Even gzipped the payload is a few MB, so + // it gets a longer timeout than the global 8s default to survive slow links and + // reverse-proxy / Cloudflare-Tunnel setups instead of aborting and leaving the map + // with no countries (#1254). useEffect(() => { - apiClient.get('/addons/atlas/countries/geo') + apiClient.get('/addons/atlas/countries/geo', { timeout: 30000 }) .then(res => { const geo = res.data // Dynamically build A2→A3 mapping from GeoJSON