mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-18 14:09:01 +08:00
fix(caching): no longer caching external resources locally
closes #5196
This commit is contained in:
parent
4eed9074ff
commit
8ca760dfd2
1 changed files with 3 additions and 5 deletions
|
|
@ -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: {},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue