Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
refactor(web-search): drop dead api_key path in SearXNG provider
wizardchen5fb7e692e545
diff --git a/internal/infrastructure/web_search/searxng.go b/internal/infrastructure/web_search/searxng.goindex e240bf0b1..b9d505fb7 100644--- a/internal/infrastructure/web_search/searxng.go+++ b/internal/infrastructure/web_search/searxng.go@@ -27,13 +27,9 @@ const defaultSearxngTimeout = 12 * time.Second// supplied by the tenant via WebSearchProviderParameters.BaseURL. The URL is// validated with utils.ValidateURLForSSRF; private/loopback hosts must be added// to the SSRF_WHITELIST environment variable.-//-// API key is optional and only required when the SearXNG instance enables it-// (server.secret_key with limiter / json format restrictions).type SearxngProvider struct {client *http.ClientbaseURL string- apiKey string}// ValidateSearxngBaseURL validates a SearXNG instance URL: must be a non-empty,@@ -75,7 +71,6 @@ func NewSearxngProvider(params types.WebSearchProviderParameters) (interfaces.Wereturn &SearxngProvider{client: client,baseURL: strings.TrimRight(base, "/"),- apiKey: strings.TrimSpace(params.APIKey),}, nil}@@ -115,11 +110,6 @@ func (p *SearxngProvider) Search(}req.Header.Set("Accept", "application/json")req.Header.Set("User-Agent", "WeKnora/1.0")- if p.apiKey != "" {- // SearXNG does not have a built-in auth header; the api_key field is reused- // to support reverse-proxies that gate access via Authorization.- req.Header.Set("Authorization", "Bearer "+p.apiKey)- }resp, err := p.client.Do(req)if err != nil {