SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] autocomplete: drop POST method
vojkovicd81810d2a7b2
diff --git a/client/simple/src/js/main/autocomplete.ts b/client/simple/src/js/main/autocomplete.tsindex aea67c75d..15eb8304b 100644--- a/client/simple/src/js/main/autocomplete.ts+++ b/client/simple/src/js/main/autocomplete.ts@@ -5,13 +5,7 @@ import { assertElement } from "../util/assertElement.ts";const fetchResults = async (qInput: HTMLInputElement, query: string): Promise<void> => {try {- let res: Response;-- if (settings.method === "GET") {- res = await http("GET", `./autocompleter?q=${query}`);- } else {- res = await http("POST", "./autocompleter", { body: new URLSearchParams({ q: query }) });- }+ const res = await http("GET", `./autocompleter?q=${query}`);const results = await res.json();diff --git a/searx/templates/simple/opensearch.xml b/searx/templates/simple/opensearch.xmlindex 5176c012c..bdca24b4b 100644--- a/searx/templates/simple/opensearch.xml+++ b/searx/templates/simple/opensearch.xml@@ -13,9 +13,9 @@</Url>{% endif %}{% if autocomplete %}- <Url rel="suggestions" type="application/x-suggestions+json" method="{{ opensearch_method }}" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/>+ <Url rel="suggestions" type="application/x-suggestions+json" method="GET" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/>{% endif %}- <Url rel="self" type="application/opensearchdescription+xml" method="{{ opensearch_method }}" template="{{ url_for('opensearch', _external=True) }}" />+ <Url rel="self" type="application/opensearchdescription+xml" template="{{ url_for('opensearch', _external=True) }}" /><Query role="example" searchTerms="SearXNG" /><moz:SearchForm>{{ url_for('search', _external=True) }}</moz:SearchForm></OpenSearchDescription>diff --git a/searx/webapp.py b/searx/webapp.pyindex 18df14f58..ff2f496b5 100755--- a/searx/webapp.py+++ b/searx/webapp.py@@ -803,7 +803,7 @@ def info(pagename, locale):)[email protected]('/autocompleter', methods=['GET', 'POST'])[email protected]('/autocompleter', methods=['GET'])def autocompleter():"""Return autocompleter results"""