Fix CSP for OpenStreetMap tiles

This commit is contained in:
Ettore
2026-05-10 22:34:43 +02:00
parent 7e84587788
commit d51141ceef
2 changed files with 4 additions and 2 deletions

View File

@@ -17,8 +17,9 @@ self.addEventListener("activate", event => {
});
self.addEventListener("fetch", event => {
// Let API calls always go to the network
// Let API calls and map tiles always go to the network
if (event.request.url.includes("/api/")) return;
if (event.request.url.includes("tile.openstreetmap.org")) return;
// Navigation requests (page loads, QR code opens) must always hit the network
// so query parameters like ?k=CODE are preserved for app.js