fix: use IMGW Hybrid for current weather
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const CACHE_NAME = "wtr-shell-v1";
|
||||
const CACHE_NAME = "wtr-shell-v2";
|
||||
const SHELL = ["/", "/offline", "/manifest.json", "/icons/icon.svg", "/icons/maskable.svg", "/icons/icon-192.png", "/icons/icon-512.png", "/icons/maskable-512.png"];
|
||||
|
||||
self.addEventListener("install", (event) => {
|
||||
@@ -16,7 +16,7 @@ self.addEventListener("activate", (event) => {
|
||||
self.addEventListener("fetch", (event) => {
|
||||
if (event.request.method !== "GET") return;
|
||||
const url = new URL(event.request.url);
|
||||
if (url.pathname.startsWith("/api/imgw/")) {
|
||||
if (url.pathname.startsWith("/api/imgw/") || url.pathname === "/api/imgw-current") {
|
||||
event.respondWith(
|
||||
fetch(event.request)
|
||||
.then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user