Added google analytics to no cache list (#2237)

This commit is contained in:
Luke Weiler 2022-01-01 15:51:00 -05:00 committed by GitHub
parent 9980e2129f
commit bf0e9c27cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ self.addEventListener("install", (event) => {
self.addEventListener("fetch", async (event) => {
const host = new URL(event.request.url).host;
if (
["localhost:5005", "api.monkeytype.com", "api.github.com"].includes(host)
["localhost:5005", "api.monkeytype.com", "api.github.com", "www.google-analytics.com"].includes(host)
) {
// if hostname is a non-static api, fetch request
event.respondWith(fetch(event.request));