fix(search): enforce blockedProviders setting on search endpoint (#11100) (#11125)

Cherry-picked the three value commits onto the current tip, dropping the stale base-red sync commits. Focused tests: search-blocked-providers-11100 + search-registry/searxng-loopback/chat-guard/x-search suites 65/65. Fixes #11100 (endpoint half) — GET /v1/search now honors blockedProviders via getAllSearchProviders. Thank you @rqzbeh!
This commit is contained in:
Rouzbeh†
2026-08-22 22:43:26 +03:30
committed by GitHub
parent 4220c810ee
commit 367ae2fb97
3 changed files with 22 additions and 9 deletions

View File

@@ -58,9 +58,7 @@ export async function OPTIONS() {
export async function GET() {
const settings = await getSettings().catch(() => ({} as any));
const blockedProviders = settings?.blockedProviders || [];
const providers = getAllSearchProviders().filter(
(p) => !isProviderBlockedByIdOrAlias(p.id, blockedProviders)
);
const providers = getAllSearchProviders(blockedProviders);
const timestamp = Math.floor(Date.now() / 1000);
const data = providers.map((p) => ({