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:; " +
|
||||
"style-src 'self' 'unsafe-inline' fonts.googleapis.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; " +
|
||||
"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'; " +
|
||||
"base-uri 'self'; " +
|
||||
"form-action 'self';"
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
sources: {
|
||||
'osm-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,
|
||||
attribution: '© Stadia Maps © Stamen Design © OpenStreetMap contributors'
|
||||
attribution: '© OpenStreetMap contributors'
|
||||
}
|
||||
},
|
||||
layers: [
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
type="font/ttf"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<link rel="dns-prefetch" href="//tiles.stadiamaps.com" />
|
||||
<link rel="preconnect" href="https://tiles.stadiamaps.com" crossorigin="anonymous" />
|
||||
<link rel="dns-prefetch" href="//tile.openstreetmap.org" />
|
||||
<link rel="preconnect" href="https://tile.openstreetmap.org" crossorigin="anonymous" />
|
||||
<!-- Resource hints for login page background -->
|
||||
{#if isLoginRoute}
|
||||
<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
|
||||
if (url.hostname === 'tiles.stadiamaps.com') {
|
||||
if (url.hostname === 'tile.openstreetmap.org') {
|
||||
const cachedResponse = await r2Cache.match(event.request);
|
||||
if (cachedResponse) {
|
||||
return cachedResponse;
|
||||
|
||||
Reference in New Issue
Block a user