From 0b563a93ec3a2573169b9d49bfb3c8b0de5f2b87 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 11 May 2023 16:52:32 +0200 Subject: [PATCH] Fetcher - Experimental fetcher - dont cache embedded data URLs --- changedetectionio/res/puppeteer_fetch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changedetectionio/res/puppeteer_fetch.js b/changedetectionio/res/puppeteer_fetch.js index 0c6a99fb..d376729f 100644 --- a/changedetectionio/res/puppeteer_fetch.js +++ b/changedetectionio/res/puppeteer_fetch.js @@ -97,6 +97,10 @@ module.exports = async ({page, context}) => { console.log("Skipping (no_cache_list) - " + url); return; } + if (url.toLowerCase().includes('data:')) { + console.log("Skipping (embedded-data) - " + url); + return; + } response.buffer().then(buffer => { if (buffer.length > 100) { console.log("Cache - Saving " + response.request().method() + " - " + url + " - " + response.request().resourceType());