fix:switch back to OSM
This commit is contained in:
@@ -50,9 +50,9 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||||||
"worker-src 'self' blob:; " +
|
"worker-src 'self' blob:; " +
|
||||||
"style-src 'self' 'unsafe-inline' fonts.googleapis.com; " +
|
"style-src 'self' 'unsafe-inline' fonts.googleapis.com; " +
|
||||||
"font-src 'self' fonts.gstatic.com; " +
|
"font-src 'self' fonts.gstatic.com; " +
|
||||||
"img-src 'self' data: blob: *.tiles.stadiamap.com *.r2.cloudflarestorage.com *.r2.dev; " +
|
"img-src 'self' data: blob: *.openstreetmap.org *.tile.openstreetmap.org *.r2.cloudflarestorage.com *.r2.dev; " +
|
||||||
"media-src 'self' *.r2.cloudflarestorage.com *.r2.dev; " +
|
"media-src 'self' *.r2.cloudflarestorage.com *.r2.dev; " +
|
||||||
"connect-src 'self' *.stadiamap.com https://fcm.googleapis.com https://android.googleapis.com; " +
|
"connect-src 'self' *.openstreetmap.org https://fcm.googleapis.com https://android.googleapis.com; " +
|
||||||
"frame-ancestors 'none'; " +
|
"frame-ancestors 'none'; " +
|
||||||
"base-uri 'self'; " +
|
"base-uri 'self'; " +
|
||||||
"form-action 'self';"
|
"form-action 'self';"
|
||||||
|
|||||||
@@ -52,9 +52,9 @@
|
|||||||
sources: {
|
sources: {
|
||||||
'osm-raster': {
|
'osm-raster': {
|
||||||
type: 'raster',
|
type: 'raster',
|
||||||
tiles: ['https://tiles.stadiamaps.com/tiles/stamen_toner_lite/{z}/{x}/{y}.png'],
|
tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],
|
||||||
tileSize: 256,
|
tileSize: 256,
|
||||||
attribution: '© Stadia Maps © Stamen Design © OpenStreetMap contributors'
|
attribution: '© OpenStreetMap contributors'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
layers: [
|
layers: [
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
type="font/ttf"
|
type="font/ttf"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<link rel="dns-prefetch" href="//tiles.stadiamaps.com" />
|
<link rel="dns-prefetch" href="//tile.openstreetmap.org" />
|
||||||
<link rel="preconnect" href="https://tiles.stadiamaps.com" crossorigin="anonymous" />
|
<link rel="preconnect" href="https://tile.openstreetmap.org" crossorigin="anonymous" />
|
||||||
<!-- Resource hints for login page background -->
|
<!-- Resource hints for login page background -->
|
||||||
{#if isLoginRoute}
|
{#if isLoginRoute}
|
||||||
<link rel="preload" href="/cafe-bg-compressed.jpg" as="image" />
|
<link rel="preload" href="/cafe-bg-compressed.jpg" as="image" />
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ self.addEventListener('fetch', (event) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle OpenStreetMap tiles with cache-first strategy
|
// Handle OpenStreetMap tiles with cache-first strategy
|
||||||
if (url.hostname === 'tiles.stadiamaps.com') {
|
if (url.hostname === 'tile.openstreetmap.org') {
|
||||||
const cachedResponse = await r2Cache.match(event.request);
|
const cachedResponse = await r2Cache.match(event.request);
|
||||||
if (cachedResponse) {
|
if (cachedResponse) {
|
||||||
return cachedResponse;
|
return cachedResponse;
|
||||||
|
|||||||
Reference in New Issue
Block a user