mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 22:21:27 -05:00
[PR #19092] feat: Web Search domain filter allowlist/blacklist mode #11884
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/19092
Author: @kjpoccia
Created: 11/10/2025
Status: 🔄 Open
Base:
dev← Head:feat/websearch-filters📝 Commits (3)
e0d5de1Merge pull request #18978 from open-webui/dev1929b17Incorporate is_allowlist flag and filtering to provide option to make domain filter a block list73bdd9eindentation📊 Changes
27 files changed (+252 additions, -41 deletions)
View changed files
📝
backend/open_webui/config.py(+16 -7)📝
backend/open_webui/main.py(+4 -0)📝
backend/open_webui/retrieval/web/bing.py(+6 -1)📝
backend/open_webui/retrieval/web/bocha.py(+10 -2)📝
backend/open_webui/retrieval/web/brave.py(+10 -2)📝
backend/open_webui/retrieval/web/duckduckgo.py(+6 -1)📝
backend/open_webui/retrieval/web/exa.py(+20 -2)📝
backend/open_webui/retrieval/web/external.py(+6 -1)📝
backend/open_webui/retrieval/web/firecrawl.py(+6 -1)📝
backend/open_webui/retrieval/web/google_pse.py(+6 -1)📝
backend/open_webui/retrieval/web/kagi.py(+10 -2)📝
backend/open_webui/retrieval/web/main.py(+7 -2)📝
backend/open_webui/retrieval/web/mojeek.py(+10 -2)📝
backend/open_webui/retrieval/web/ollama.py(+8 -1)📝
backend/open_webui/retrieval/web/perplexity.py(+6 -2)📝
backend/open_webui/retrieval/web/perplexity_search.py(+7 -0)📝
backend/open_webui/retrieval/web/searchapi.py(+6 -1)📝
backend/open_webui/retrieval/web/searxng.py(+6 -1)📝
backend/open_webui/retrieval/web/serpapi.py(+6 -1)📝
backend/open_webui/retrieval/web/serper.py(+10 -2)...and 7 more files
📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.
This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
WEB_SEARCH_DOMAIN_LIST_IS_ALLOWLISTenvironment variable (default:true) and a UI toggle (“Treat domain list as allowlist”). This enables excluding specific domains or restricting results to a curated set while maintaining backward-compatible defaults.Description
This PR enhances Web Search domain filtering by:
Related: Proposal discussion #18944, PR #16628, PR #10358, and issue #9912.
Added
Allowlist/Blacklist mode
Changed
get_filtered_resultsfrom allowlist-only to allowlist/blacklist behavior, with consistent domain normalization, subdomain handling, and backward-compatible default (allowlist).Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.