Skip to content

Commit

Permalink
fix(caching): no longer caching external resources locally
Browse files Browse the repository at this point in the history
closes #5196
  • Loading branch information
Miodec committed Mar 7, 2024
1 parent 4eed907 commit 8ca760d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down

0 comments on commit 8ca760d

Please sign in to comment.