Feature: allow disable ipv6 in proxy, refactor cacheFetch to use proxy (#5011)
Some checks are pending
Docker / Linting Checks (push) Waiting to run
Docker / Docker Build & Push (push) Blocked by required conditions

This commit is contained in:
shamoon
2025-03-16 20:09:34 -07:00
committed by GitHub
parent 934ad3a6f1
commit b4dc53c7c0
10 changed files with 61 additions and 65 deletions

View File

@@ -1,4 +1,4 @@
import cachedFetch from "utils/proxy/cached-fetch";
import { cachedRequest } from "utils/proxy/http";
import { getSettings } from "utils/config/config";
import { getPrivateWidgetOptions } from "utils/config/widget-helpers";
@@ -26,5 +26,5 @@ export default async function handler(req, res) {
const apiUrl = `http://api.weatherapi.com/v1/current.json?q=${latitude},${longitude}&key=${apiKey}&lang=${lang}`;
return res.send(await cachedFetch(apiUrl, cache));
return res.send(await cachedRequest(apiUrl, cache));
}