fix(map): the iOS app's tile store is allowed by the CSP, so its maps draw tiles again

The iOS app rewrites raster tiles to trek-tile:// and answers them from its
store. WebKit checks that scheme against img-src, which had only https:, so
every tile was refused and the app showed routes and markers on a blank map.
This commit is contained in:
Maurice
2026-11-10 09:17:25 +01:00
parent 0577a9ccb9
commit 08034c4402
2 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -280,7 +280,11 @@ export function applyGlobalMiddleware(
scriptSrc: ["'self'", "'wasm-unsafe-eval'", "'unsafe-eval'"],
// No Google Fonts: every font ships with TREK (client/public/fonts), so no reader's IP goes to Google.
styleSrc: ["'self'", "'unsafe-inline'", 'https://unpkg.com'],
imgSrc: ["'self'", 'data:', 'blob:', 'https:'],
// trek-tile: is the iOS app's map tile store (client/src/native/tileCache.ts).
// The app's web view runs this page, and WebKit holds a scheme the app
// answers itself to img-src as well: without it every raster tile was
// refused and the app showed routes on a blank map.
imgSrc: ["'self'", 'data:', 'blob:', 'https:', 'trek-tile:'],
connectSrc: [
"'self'",
'ws:',