fix(caching): no longer caching external resources locally

closes #5196
This commit is contained in:
Miodec 2024-03-07 22:08:29 +01:00
parent 4eed9074ff
commit 8ca760dfd2

View file

@ -171,11 +171,9 @@ const BUILD_CONFIG = {
navigateFallback: "",
runtimeCaching: [
{
urlPattern: ({ request, url }) => {
const sameOrigin =
new URL(request.url).origin === new URL(url).origin;
const isApi = request.url.includes("api.monkeytype.com");
return sameOrigin && !isApi;
urlPattern: (options) => {
const isApi = options.url.hostname === "api.monkeytype.com";
return options.sameOrigin && !isApi;
},
handler: "NetworkFirst",
options: {},