mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 15:28:47 +00:00
Feature: allow disable ipv6 in proxy, refactor cacheFetch to use proxy (#5011)
This commit is contained in:
parent
934ad3a6f1
commit
b4dc53c7c0
10 changed files with 61 additions and 65 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue