on master help sign in
Make default query submission method configurable

Sending queries through POST, while better for privacy, breaks functionality with certain extensions (e.g. Firefox containers). Since Firefox does not send cookies when requesting `/opensearch.xml`, users cannot easily switch to GET on the client side unless they make a custom search engine. This commit allows admins to modify the default method on their side so they can set it to GET if needed.

commit8dff74dd1b9f63b6e300991211582157b34ee328 authorMohamad Safadieh <me@msafadieh.com> dateSun 9 Aug 2020, 16:57 (6 years ago) parentf3bfc19
2 files changed+2−1
searx/preferences.py+1−1 searx/settings.yml+1
searx/preferences.py+1−1
@@ -348,7 +348,7 @@ class Preferences(object):
348348 }
349349 ),
350350 'method': EnumStringSetting(
351− 'POST',
351+ settings['server'].get('method', 'POST'),
352352 choices=('GET', 'POST')
353353 ),
354354 'safesearch': MapSetting(
searx/settings.yml+1
@@ -16,6 +16,7 @@ server:
1616 base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
1717 image_proxy : False # Proxying image results through searx
1818 http_protocol_version : "1.0" # 1.0 and 1.1 are supported
19+ method: "POST" # POST queries are more secure as they don't show up in history but may cause problems when using Firefox containers
1920
2021ui:
2122 static_path : "" # Custom static path - leave it blank if you didn't change