v1.0.6: fix CSP wildcard *.geo.admin.ch, fix SW tile caching, dropdown layer selector, reduce swisstopo maxzoom

This commit is contained in:
Pepe Ziberi
2026-02-22 00:32:14 +01:00
parent 0abc1c6b02
commit e4c3c92cab
4 changed files with 27 additions and 32 deletions

View File

@@ -87,8 +87,8 @@ self.addEventListener('fetch', (event) => {
// Other API requests: network only
if (pathname.startsWith('/api/')) return
// Cache map tiles from OpenStreetMap / MapTiler (Cache First — tiles don't change)
if (url.includes('tile.openstreetmap.org') || url.includes('api.maptiler.com')) {
// Cache map tiles from OSM / MapTiler / ArcGIS / Swisstopo (Cache First — tiles don't change)
if (url.includes('tile.openstreetmap.org') || url.includes('api.maptiler.com') || url.includes('server.arcgisonline.com') || url.includes('geo.admin.ch')) {
event.respondWith(
caches.open(TILE_CACHE).then((cache) =>
cache.match(event.request).then((cached) => {