fix: Use jsDelivr CDN for categories JSON to avoid CORS issues

GitHub raw URLs don't allow cross-origin requests from localhost.
Using jsDelivr CDN which serves GitHub content with proper CORS headers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chris Sherwood 2026-01-18 16:01:15 -08:00 committed by Jake Turner
parent 3cb5dceb1d
commit 8e6e44e688

View File

@ -22,7 +22,7 @@ const CURATED_MAP_COLLECTIONS_KEY = 'curated-map-collections'
const CURATED_ZIM_COLLECTIONS_KEY = 'curated-zim-collections'
const CURATED_CATEGORIES_KEY = 'curated-categories'
const CATEGORIES_URL =
'https://github.com/Crosstalk-Solutions/project-nomad/raw/refs/heads/feature/tiered-collections/collections/kiwix-categories.json'
'https://cdn.jsdelivr.net/gh/Crosstalk-Solutions/project-nomad@feature/tiered-collections/collections/kiwix-categories.json'
// Helper to get all resources for a tier (including inherited resources)
const getAllResourcesForTier = (tier: CategoryTier, allTiers: CategoryTier[]): CategoryResource[] => {