1 Commits

Author SHA1 Message Date
Ivan Gabaldon
26a2f16649 Revert "[upd] pypi: Bump the minor group across 1 directory with 3 updates (#…"
This reverts commit e8e710e42a.
2026-08-12 01:32:55 +02:00
13 changed files with 28 additions and 28 deletions

View File

@@ -8,7 +8,7 @@
search: search:
safe_search: 0 safe_search: 0
autocomplete: "duckduckgo" autocomplete: ""
favicon_resolver: "" favicon_resolver: ""
default_lang: "" default_lang: ""
ban_time_on_fail: 5 ban_time_on_fail: 5
@@ -32,7 +32,7 @@
- ``2``: Strict - ``2``: Strict
``autocomplete``: ``autocomplete``:
Existing autocomplete backends, set blank to turn it off. Existing autocomplete backends, leave blank to turn it off.
- ``360search`` - ``360search``
- ``baidu`` - ``baidu``

View File

@@ -14,7 +14,7 @@
limiter: false limiter: false
public_instance: false public_instance: false
image_proxy: false image_proxy: false
method: "GET" method: "POST"
default_http_headers: default_http_headers:
X-Content-Type-Options : nosniff X-Content-Type-Options : nosniff
X-Download-Options : noopen X-Download-Options : noopen
@@ -58,8 +58,8 @@
``method`` : ``GET`` | ``POST`` ``method`` : ``GET`` | ``POST``
HTTP method. By default, ``GET`` is used / The ``POST`` method has the HTTP method. By defaults ``POST`` is used / The ``POST`` method has the
advantage with some browsers that the history is not saved, but advantage with some WEB browsers that the history is not easy to read, but
there are also various disadvantages that sometimes **severely restrict the there are also various disadvantages that sometimes **severely restrict the
ease of use for the end user** (e.g. back button to jump back to the previous ease of use for the end user** (e.g. back button to jump back to the previous
search page and drag & drop of search term to new tabs do not work as search page and drag & drop of search term to new tabs do not work as

View File

@@ -43,10 +43,9 @@ def init(_):
def request(query: str, params: "OnlineParams"): def request(query: str, params: "OnlineParams"):
params["url"] = f"{base_url}/api/{dogpile_categ}" params["url"] = f"{base_url}/api/{dogpile_categ}"
params["headers"]["Origin"] = base_url
params["method"] = "POST" params["method"] = "POST"
params["json"] = {"q": query, "qadf": safe_search_map[params["safesearch"]], "page": params["pageno"]} params["json"] = {"q": query, "qadf": safe_search_map[params["safesearch"]], "page": params["pageno"]}
return params
def response(resp: "SXNG_Response"): def response(resp: "SXNG_Response"):

View File

@@ -41,9 +41,9 @@ search:
# Filter results. 0: None, 1: Moderate, 2: Strict # Filter results. 0: None, 1: Moderate, 2: Strict
safe_search: 0 safe_search: 0
# Existing autocomplete backends: "360search", "baidu", "bing", "brave", "dbpedia", "duckduckgo", "google", # Existing autocomplete backends: "360search", "baidu", "bing", "brave", "dbpedia", "duckduckgo", "google",
# "yandex", "privacywall", "mwmbl", "naver", "seznam", "sogou", "startpage", "swisscows", "quark", "qwant", # "kagi", "yandex", "privacywall", "mwmbl", "naver", "seznam", "sogou", "startpage", "swisscows", "quark",
# "wikipedia" - set blank to turn it off by default. # "qwant", "wikipedia" - leave blank to turn it off by default.
autocomplete: "duckduckgo" autocomplete: ""
# minimun characters to type before autocompleter starts # minimun characters to type before autocompleter starts
autocomplete_min: 4 autocomplete_min: 4
# backend for the favicon near URL in search results. # backend for the favicon near URL in search results.
@@ -107,10 +107,11 @@ server:
image_proxy: false image_proxy: false
# 1.0 and 1.1 are supported # 1.0 and 1.1 are supported
http_protocol_version: "1.0" http_protocol_version: "1.0"
# POST keeps search queries out of the browsers history, but causes UX issues. # POST queries are "more secure!" but are also the source of hard-to-locate
# annoyances, which is why GET may be better for end users and their browsers.
# see https://github.com/searxng/searxng/pull/3619 # see https://github.com/searxng/searxng/pull/3619
# Is overwritten by ${SEARXNG_METHOD} # Is overwritten by ${SEARXNG_METHOD}
method: "GET" method: "POST"
default_http_headers: default_http_headers:
X-Content-Type-Options: nosniff X-Content-Type-Options: nosniff
X-Download-Options: noopen X-Download-Options: noopen
@@ -852,28 +853,28 @@ engines:
shortcut: dog shortcut: dog
dogpile_categ: search dogpile_categ: search
categories: general categories: general
inactive: true disabled: true
- name: dogpile images - name: dogpile images
engine: dogpile engine: dogpile
shortcut: dogi shortcut: dogi
dogpile_categ: images dogpile_categ: images
categories: images categories: images
inactive: true disabled: true
- name: dogpile videos - name: dogpile videos
engine: dogpile engine: dogpile
shortcut: dogv shortcut: dogv
dogpile_categ: videos dogpile_categ: videos
categories: videos categories: videos
inactive: true disabled: true
- name: dogpile news - name: dogpile news
engine: dogpile engine: dogpile
shortcut: dogn shortcut: dogn
dogpile_categ: news dogpile_categ: news
categories: news categories: news
inactive: true disabled: true
# duckduckgo uses html.duckduckgo.com, # duckduckgo uses html.duckduckgo.com,
# duckduckgo web uses duckduckgo.com # duckduckgo web uses duckduckgo.com

View File

@@ -192,7 +192,7 @@ SCHEMA: dict[str, t.Any] = {
'brand': SettingsBrand, 'brand': SettingsBrand,
'search': { 'search': {
'safe_search': SettingsValue((0, 1, 2), 0), 'safe_search': SettingsValue((0, 1, 2), 0),
'autocomplete': SettingsValue(str, 'duckduckgo'), 'autocomplete': SettingsValue(str, ''),
'autocomplete_min': SettingsValue(int, 4), 'autocomplete_min': SettingsValue(int, 4),
'favicon_resolver': SettingsValue(str, ''), 'favicon_resolver': SettingsValue(str, ''),
'default_lang': SettingsValue(tuple(SXNG_LOCALE_TAGS + ['']), ''), 'default_lang': SettingsValue(tuple(SXNG_LOCALE_TAGS + ['']), ''),
@@ -219,7 +219,7 @@ SCHEMA: dict[str, t.Any] = {
'base_url': SettingsValue((False, str), False, 'SEARXNG_BASE_URL'), 'base_url': SettingsValue((False, str), False, 'SEARXNG_BASE_URL'),
'image_proxy': SettingsValue(bool, False, 'SEARXNG_IMAGE_PROXY'), 'image_proxy': SettingsValue(bool, False, 'SEARXNG_IMAGE_PROXY'),
'http_protocol_version': SettingsValue(('1.0', '1.1'), '1.0'), 'http_protocol_version': SettingsValue(('1.0', '1.1'), '1.0'),
'method': SettingsValue(('POST', 'GET'), 'GET', 'SEARXNG_METHOD'), 'method': SettingsValue(('POST', 'GET'), 'POST', 'SEARXNG_METHOD'),
'default_http_headers': SettingsValue(dict, {}), 'default_http_headers': SettingsValue(dict, {}),
}, },
# redis is deprecated .. # redis is deprecated ..

View File

@@ -4,7 +4,7 @@
<div class="wrapper"> <div class="wrapper">
{%- for output_type in search_formats -%} {%- for output_type in search_formats -%}
<div class="left"> <div class="left">
<form method="{{ method }}" action="{{ url_for('search') }}"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
<input type="hidden" name="q" value="{{ q|e }}"> <input type="hidden" name="q" value="{{ q|e }}">
{%- for category in selected_categories -%} {%- for category in selected_categories -%}
<input type="hidden" name="category_{{ category }}" value="1"> <input type="hidden" name="category_{{ category }}" value="1">

View File

@@ -2,7 +2,7 @@
<h4 id="corrections-title">{{ _('Try searching for:') }}</h4> <h4 id="corrections-title">{{ _('Try searching for:') }}</h4>
{% for correction in corrections %} {% for correction in corrections %}
<div class="left"> <div class="left">
<form method="{{ method }}" action="{{ url_for('search') }}" role="navigation"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation">
{% for category in selected_categories %} {% for category in selected_categories %}
<input type="hidden" name="category_{{ category }}" value="1"> <input type="hidden" name="category_{{ category }}" value="1">
{% endfor %} {% endfor %}

View File

@@ -31,7 +31,7 @@
<div> <div>
<h3><bdi>{{ topic.name }}</bdi></h3> <h3><bdi>{{ topic.name }}</bdi></h3>
{%- for suggestion in topic.suggestions -%} {%- for suggestion in topic.suggestions -%}
<form method="{{ method }}" action="{{ url_for('search') }}"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
<input type="hidden" name="q" value="{{ suggestion }}"> <input type="hidden" name="q" value="{{ suggestion }}">
<input type="hidden" name="time_range" value="{{ time_range }}"> <input type="hidden" name="time_range" value="{{ time_range }}">
<input type="hidden" name="language" value="{{ current_language }}"> <input type="hidden" name="language" value="{{ current_language }}">

View File

@@ -3,7 +3,7 @@
<summary class="title" id="suggestions-title">{{ _('Suggestions') }}</summary> <summary class="title" id="suggestions-title">{{ _('Suggestions') }}</summary>
<ul class="wrapper"> <ul class="wrapper">
{%- for suggestion in suggestions -%} {%- for suggestion in suggestions -%}
<li><form method="{{ method }}" action="{{ url_for('search') }}"> <li><form method="{{ method or 'POST' }}" action="{{ url_for('search') }}">
<input type="hidden" name="q" value="{{ suggestion.url }}"> <input type="hidden" name="q" value="{{ suggestion.url }}">
{%- for category in selected_categories -%} {%- for category in selected_categories -%}
<input type="hidden" name="category_{{ category }}" value="1"> <input type="hidden" name="category_{{ category }}" value="1">

View File

@@ -75,7 +75,7 @@
{% if paging %} {% if paging %}
<nav id="pagination" role="navigation"> <nav id="pagination" role="navigation">
{% if pageno > 1 %} {% if pageno > 1 %}
<form method="{{ method }}" action="{{ url_for('search') }}" class="previous_page"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="previous_page">
<div class="{% if rtl %}right{% else %}left{% endif %}"> <div class="{% if rtl %}right{% else %}left{% endif %}">
<input type="hidden" name="q" value="{{ q|e }}" > <input type="hidden" name="q" value="{{ q|e }}" >
{% for category in selected_categories %} {% for category in selected_categories %}
@@ -93,7 +93,7 @@
</form> </form>
{% endif %} {% endif %}
{%- if results | count > 0 -%} {%- if results | count > 0 -%}
<form method="{{ method }}" action="{{ url_for('search') }}" class="next_page"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="next_page">
<div class="{% if rtl %}left{% else %}right{% endif %}"> <div class="{% if rtl %}left{% else %}right{% endif %}">
<input type="hidden" name="q" value="{{ q|e }}" > <input type="hidden" name="q" value="{{ q|e }}" >
{% for category in selected_categories %} {% for category in selected_categories %}
@@ -119,7 +119,7 @@
<div class="numbered_pagination"> <div class="numbered_pagination">
{% for x in range(pstart, pend) %} {% for x in range(pstart, pend) %}
<form method="{{ method }}" action="{{ url_for('search') }}" class="page_number"> <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="page_number">
<input type="hidden" name="q" value="{{ q|e }}" > <input type="hidden" name="q" value="{{ q|e }}" >
{% for category in selected_categories %} {% for category in selected_categories %}
<input type="hidden" name="category_{{ category }}" value="1" > <input type="hidden" name="category_{{ category }}" value="1" >

View File

@@ -1,4 +1,4 @@
<form id="search" method="{{ method }}" action="{{ url_for('search') }}" role="search"> <form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="search">
<div id="search_header"> <div id="search_header">
<a id="search_logo" href="{{ url_for('index') }}" tabindex="0" title="{{ _('Display the front page') }}"> <a id="search_logo" href="{{ url_for('index') }}" tabindex="0" title="{{ _('Display the front page') }}">
<span hidden>SearXNG</span> <span hidden>SearXNG</span>

View File

@@ -1,4 +1,4 @@
<form id="search" method="{{ method }}" action="{{ url_for('search') }}" role="search"> <form id="search" method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="search">
<div id="search_header"> <div id="search_header">
<div id="search_view"> <div id="search_view">
<div class="search_box"> <div class="search_box">

View File

@@ -1195,7 +1195,7 @@ def opensearch():
method = 'GET' method = 'GET'
if method not in ('POST', 'GET'): if method not in ('POST', 'GET'):
method = 'GET' method = 'POST'
ret = render('opensearch.xml', opensearch_method=method, autocomplete=autocomplete) ret = render('opensearch.xml', opensearch_method=method, autocomplete=autocomplete)
resp = Response(response=ret, status=200, mimetype="application/opensearchdescription+xml") resp = Response(response=ret, status=200, mimetype="application/opensearchdescription+xml")