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. |
||
|---|---|---|
| .. | ||
| activity-logger.ts | ||
| auth.ts | ||
| cmsCache.ts | ||
| countries.ts | ||
| database.ts | ||
| dx-runtime.ts | ||
| email-templates.ts | ||
| email.ts | ||
| glossary.ts | ||
| openrouter.ts | ||
| rate-limit.ts | ||
| rbac.ts | ||
| renderTiptap.ts | ||
| sendgrid.ts | ||
| site-settings.ts | ||
| storage.ts | ||
| tiptapFromMarkdown.ts | ||
| tiptapLossyDetector.ts | ||
| tiptapToMarkdown.ts | ||
| tiptapValidate.ts | ||
| translate.ts | ||
| urlValidation.ts | ||