doxa-maps-cdn/server
doxa-maps ba1a906168 Plugin Studio branch: the gallery and maps addresses are read per request, never baked
This branch sends readers to the Research Gallery (the public Plugin Studio
on its own subdomain) and loads the site's maps from that subdomain's /cdn.
Both addresses belong to the deployment:
  NUXT_PUBLIC_RESEARCH_GALLERY_URL  https://research.<host>/
  NUXT_PUBLIC_DX_MAPS_BASE          https://research.<host>/cdn/dx-maps

About 4,000 pages are prerendered, and a prerendered page carries the
build's runtime config, so an address read there is baked into the build.
One build could then serve only one deployment; the CDN branch failed that
way. So neither address is in nuxt.config any more:
- the server reads both from its environment per request
  (server/utils/dx-runtime.ts);
- GET /api/dx-runtime answers them, no-store. Every map (DoxaMapSlot via
  useDoxaMap, /research, /embed-test, and the static pages under public/)
  asks it first, then loads its bundle from that tree. The map's element is
  added only once the tree is known, and the map bundle's preload is added
  then, still while Mapbox downloads;
- every gallery link, the Research menu item, and the /regions and
  /countries index rules go to this site's /research-gallery?tab=&lang=,
  which 302s (no-store) to the gallery. It works without JavaScript, and a
  prerendered page names no host;
- old /js/doxa-maps and /embed/doxa-maps-build links are redirected per
  request by server/middleware/legacy-map-links.ts. They were build-time
  route rules.

No fallback host: the maps-dev and research defaults are gone. When a
setting is unset, /research-gallery answers 503 and each map says which
setting to set. Changing an address needs a restart, not a rebuild.
2026-09-29 04:48:59 +00:00
..
api Plugin Studio branch: the gallery and maps addresses are read per request, never baked 2026-09-29 04:48:59 +00:00
database replace deepl with llm translation via openrouter 2026-09-07 16:30:48 +01:00
mcp read the glossary from pray.doxa.life instead of a vendored file 2026-09-18 10:06:13 +01:00
middleware Plugin Studio branch: the gallery and maps addresses are read per request, never baked 2026-09-29 04:48:59 +00:00
plugins feat: update contact-us form to use the same format as feedback forms 2026-09-23 11:47:12 +01:00
routes Plugin Studio branch: the gallery and maps addresses are read per request, never baked 2026-09-29 04:48:59 +00:00
services read the glossary from pray.doxa.life instead of a vendored file 2026-09-18 10:06:13 +01:00
utils Plugin Studio branch: the gallery and maps addresses are read per request, never baked 2026-09-29 04:48:59 +00:00