Check host only

This commit is contained in:
Kieran 2023-01-19 11:56:11 +00:00
parent 85ae337fb8
commit 1d56c47322
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -31,7 +31,7 @@ registerRoute(({ request, url }) => url.origin === self.location.origin && stati
// External media domains which have unique urls (never changing content) and can be cached forever // External media domains which have unique urls (never changing content) and can be cached forever
const externalMediaHosts = ["void.cat", "nostr.build", "imgur.com", "i.imgur.com", "pbs.twimg.com", "i.ibb.co"]; const externalMediaHosts = ["void.cat", "nostr.build", "imgur.com", "i.imgur.com", "pbs.twimg.com", "i.ibb.co"];
registerRoute(({ request, url }) => externalMediaHosts.includes(url.host) && staticTypes.includes(request.destination), registerRoute(({ url }) => externalMediaHosts.includes(url.host),
new CacheFirst({ new CacheFirst({
cacheName: "ext-content-hosts" cacheName: "ext-content-hosts"
})); }));