Skip to content

fix(map): also proxy carto tile shard subdomains#20

Merged
ronload merged 1 commit into
mainfrom
fix/map-cors-tile-shards
Apr 15, 2026
Merged

fix(map): also proxy carto tile shard subdomains#20
ronload merged 1 commit into
mainfrom
fix/map-cors-tile-shards

Conversation

@ronload

@ronload ronload commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Summary

#19 代理了 tiles.basemaps.cartocdn.com,但 Carto 會將 tile 請求分散到 tiles-a/tiles-b/tiles-c/tiles-d 子網域,這些沒被攔截到,導致 .mvt tile 仍然出現同樣的 http/https CORS 錯誤。

proxyCartoUrl 改用 regex 匹配 tiles(?:-[a-d])?.basemaps.cartocdn.com,統一導到 /map-cdn/tiles/ 代理路徑。

Test plan

  • 部署至 preview -> 確認 console 無 CORS 錯誤
  • 地圖正常渲染,tile 皆透過 /map-cdn/tiles/ 載入

Carto distributes tile requests across tiles-a/b/c/d subdomains.
These were not caught by the previous proxy rewrite, causing the
same http/https CORS mismatch on .mvt tile fetches.
@vercel

vercel Bot commented Apr 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zipkit Ready Ready Preview, Comment Apr 15, 2026 10:07am

@ronload ronload merged commit b5c55c3 into main Apr 15, 2026
3 checks passed
@ronload ronload deleted the fix/map-cors-tile-shards branch April 15, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant