mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-14 05:02:09 +08:00
Feature: allow disable ipv6 in proxy, refactor cacheFetch to use proxy (#5011)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { searchProviders } from "components/widgets/search/search";
|
||||
|
||||
import { getSettings } from "utils/config/config";
|
||||
import cachedFetch from "utils/proxy/cached-fetch";
|
||||
import { cachedRequest } from "utils/proxy/http";
|
||||
import { widgetsFromConfig } from "utils/config/widget-helpers";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
@@ -29,5 +29,5 @@ export default async function handler(req, res) {
|
||||
return res.json([query, []]); // Responde with the same array format but with no suggestions.
|
||||
}
|
||||
|
||||
return res.send(await cachedFetch(`${provider.suggestionUrl}${encodeURIComponent(query)}`, 5, "Mozilla/5.0"));
|
||||
return res.send(await cachedRequest(`${provider.suggestionUrl}${encodeURIComponent(query)}`, 5, "Mozilla/5.0"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user