From b547e22705f366dee09071bff1a95b044fdee4b0 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:46:09 -0800 Subject: [PATCH] Revert "Set user agent in cached-fetch request." This reverts commit 891610ea7f41ef9b511af3019302880189240ff1. --- src/utils/proxy/cached-fetch.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/utils/proxy/cached-fetch.js b/src/utils/proxy/cached-fetch.js index de837721..0ed39562 100644 --- a/src/utils/proxy/cached-fetch.js +++ b/src/utils/proxy/cached-fetch.js @@ -12,11 +12,7 @@ export default async function cachedFetch(url, duration) { return cached; } - const data = await fetch(url, { - headers: { - "User-Agent": "Mozilla/5.0", - }, - }).then((res) => res.json()); + const data = await fetch(url).then((res) => res.json()); cache.put(url, data, duration * 1000 * 60); return data; }