summaryrefslogtreecommitdiff
path: root/searx/settings_defaults.py
AgeCommit message (Collapse)Author
2023-06-25[fix] engine & network issues / documentation and type annotationsMarkus Heiser
This patch fixes some quirks and issues related to the engines and the network. Each engine has its own network and this network was broken for the following engines[1]: - archlinux - bing - dailymotion - duckduckgo - google - peertube - startpage - wikipedia Since the files have been touched anyway, the type annotaions of the engine modules has also been completed so that error messages from the type checker are no longer reported. Related and (partial) fixed issue: - [1] https://github.com/searxng/searxng/issues/762#issuecomment-1605323861 - [2] https://github.com/searxng/searxng/issues/2513 - [3] https://github.com/searxng/searxng/issues/2515 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24[mod] replace searx.languages by searx.sxng_localesMarkus Heiser
With the language and region tags from the EngineTraitsMap the handling of SearXNG's tags of languages and regions has been normalized and is no longer a *mystery*. The "languages" became "locales" that are supported by babel and by this, the update_engine_traits.py can be simplified a lot. Other code places can be simplified as well, but these simplifications should (respectively can) only be done when none of the engines work with the deprecated EngineTraits.supported_languages interface anymore. This commit replaces searx.languages by searx.sxng_locales and fix the naming of some names from "language" to "locale" (e.g. language_codes --> sxng_locales). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-02-17Add "Auto-detected" as a language.Alexandre Flament
When the user choose "Auto-detected", the choice remains on the following queries. The detected language is displayed. For example "Auto-detected (en)": * the next query language is going to be auto detected * for the current query, the detected language is English. This replace the autodetect_search_language plugin.
2023-01-15Add search.suspended_times settingsLéon Tiekötter
Make suspended_time changeable in settings.yml Allow different values to be set for different exceptions. Co-authored-by: Alexandre Flament <alex@al-f.net>
2022-12-10[fix] follow up of PR-1856Alexandre Flament
- the environment variable SEARXNG_REDIS_URL overrides the setting value redis.url - ./manage sets SEARXNG_REDIS_URL to unix:///usr/local/searxng-redis/run/redis.sock if: - the socket exists - SEARXNG_REDIS_URL is not already defined Update of PR #1856 Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2022-11-05Initialize Redis in searx/webapp.pyAlexandre FLAMENT
settings.yml: * The default URL was unix:///usr/local/searxng-redis/run/redis.sock?db=0 * The default URL is now "false" The default URL makes the log difficult to deal with: if the admin didn't install a Redis instance, the logs record a false error. It worked before because SearXNG initialized the Redis connection when the limiter started. In this commit, SearXNG initializes Redis in searx/webapp.py so various components can use Redis without taking care of the initialization step.
2022-11-05The checker requires RedisAlexandre Flament
Remove the abstraction in searx.shared.SharedDict. Implement a basic and dedicated scheduler for the checker using a Redis script.
2022-10-14searx.network: add "verify" option to the networksAlexandre Flament
Each network can define a verify option: * false to disable certificate verification * a path to existing certificate. SearXNG uses SSL_CERT_FILE and SSL_CERT_DIR when they are defined see https://www.python-httpx.org/environment_variables/#ssl_cert_file
2022-09-04[mod] option 'ui: cache_url:' to configure internet cache or archiveMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-29Merge pull request #1708 from dalf/result_proxy_default_settingsAlexandre Flament
settings.yml: set default values for result_proxy
2022-08-28Remove usage of SEARX environment variablesAlexandre FLAMENT
2022-08-28settings.yml: set default values for result_proxyAlexandre FLAMENT
* initialize result_proxy with searx/settings_defaults.py * allow result_proxy.key to be a string this commit supersedes #1522
2022-07-07Merge pull request #1428 from return42/fix-center_aligmentAlexandre Flament
fix typo and document preference 'center_alignment' in the 'ui' section
2022-07-04[mod] link to public-instances can be set to hiddenXavier horwood
Some administrators may want to hide the link to public_instances: If you run a private instance for a company that wants there employees to use the private instance instead of any of the public instances.
2022-07-03[fix] typo: add missing 'n' in center_aligment --> center_alignmentMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-02Donation link: default value to searxng.org, can be hidden or customAlexandre Flament
Add a new setting: general.donation_url By default the value is https://docs.searxng.org/donate.html When the value is false, the link is hidden When the value is true, the link goes to the infopage donation, the administrator can create a custom page.
2022-06-18Theme: add a preference to center the results (Oscar) (2nd edition)Alexandre Flament
related to * #1169 * #1281 * #1286
2022-06-16Add privacypolicy_url optionsamsaptidev
2022-06-05Revert "Theme: add a preference to center the results (Oscar)"Alexandre Flament
This reverts commit 4237f5fd50c2dc0e91513056d885f25038ef6787.
2022-06-05Theme: add a preference to center the results (Oscar)Alexandre Flament
related to #1169
2022-05-07[mod] add setting: search.autocomplete_minMarkus Heiser
Minimun characters to type before autocompleter starts. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-30[theme] peel out oscar from SearXNG developmentMarkus Heiser
This is the first step of removing oscar theme Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-20[interim fix] static files can't be delivered by HTTP.Markus Heiser
Since PR 932 [1][2] static files can't be delivered by HTTP server any longer. This patch makes the hash paramter in the URL of static files: /static/themes/simple/css/searxng.min.css?5fde34a74bc438c7b56ec8c6501e131cc9914bd8 optional. By default the hash parameter is disabled. HINT: Instances that do not deliver static files by their HTTP server and have a long expire time [3] should enable this option. ---- This is only a interim solution, on the long run: make static.build.commit creates files including the file name: css/searxng-5fde34a74bc438c7b56ec8c6501e131cc9914bd8.min.css and a mapping.json with this content[4] [1] https://github.com/searxng/searxng/issues/964 [2] https://github.com/searxng/searxng/pull/932#issuecomment-1067039518 [3] https://github.com/searxng/searxng/pull/932/commits/55833364401ed72c30b3e85c16824a75de6b547a [4] https://github.com/searxng/searxng/pull/932#issuecomment-1067216426 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-19settings.yml: allow to base_url with the SEARXNG_BASE_URL env variableAlexandre Flament
Related to https://github.com/searxng/searxng-docker/pull/12
2022-02-21Merge pull request #916 from dalf/pref_infinite_scroll2Alexandre Flament
Convert the infinite_scroll plugin as a preference (second version)
2022-02-20[mod] infinite_scroll as preferenceAlexandre Flament
* oscar theme: code from searx/plugins/infinite_scroll.py * simple theme: new implementation Co-authored-by: Markus Heiser <markus.heiser@darmarIT.de>
2022-02-20[mod] switch default theme from oscar to simpleMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-02-02[enh] limiter pluginAlexandre Flament
can replace filtron: * rate limite the number of request per IP and per (IP, User-Agent) * block some bots use Redis data stored in Redis never contains the IP addresses, only HMAC using the secret_key Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-11Merge pull request #686 from return42/lib_redisMarkus Heiser
Add redis DB and connector
2022-01-06Merge pull request #634 from not-my-profile/powered-byAlexandre Flament
Introduce `categories_as_tabs` & group engines in tabs
2022-01-05Merge pull request #688 from dalf/settings_enable_statsMarkus Heiser
[enh] settings.yml: implement general.enable_metrics
2022-01-05[enh] settings.yml: implement general.enable_metricsAlexandre Flament
* allow not to record metrics (response time, etc...) * this commit doesn't change the UI. If the metrics are disabled /stats and /stats/errors will return empty response. in /preferences, the columns response time and reliability will be empty.
2022-01-05[enh] change categories_as_tabs from a list to a dictMartin Fischer
The tab icon names are currently hard coded in the templates. This commit lets us introduce an icon property in the future, e.g: categories_as_tabs: general: icon: search-outline
2022-01-03[enh] add redis connector searx/shared/redisdb.pyMarkus Heiser
Add a redis connector, the default DB connector is a socket at:: unix:///usr/local/searxng-redis/run/redis.sock?db=0 To set up a redis instance simply use:: $ ./manage redis.build $ sudo -H ./manage redis.install A hint for developers: To get access rights to this instance, your developer account needs to be added to the *searxng-redis* group:: $ sudo -H ./manage redis.addgrp "${USER}" # don't forget to logout & login to get member of group Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-03[enh] introduce categories_as_tabsMartin Fischer
Previously all categories were displayed as search engine tabs. This commit changes that so that only the categories listed under categories_as_tabs in settings.yml are displayed. This lets us introduce more categories without cluttering up the UI. Categories not displayed as tabs can still be searched with !bangs.
2022-01-02reference docs.searxng.orgAlexandre Flament
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-24Merge pull request #485 from dalf/pref_query_in_titleAlexandre Flament
[mod] new preference: query_in_title
2021-11-19[enh] simple theme: add "simple-style" preferencesAlexandre Flament
2021-11-08[mod] new preference: query_in_titleAlexandre Flament
* disable by default * settings.yml: ui.query_in_title * in /preferences: privacy tab when enabled, the result page's title contains the user query. previously: * oscar theme: the query was always included * simple theme: the query was included with the GET method
2021-10-27[mod] settings_defaults.py: default values for the brand sectionAlexandre Flament
2021-10-26[enh] reduce the available language listAlexandre Flament
close #406 settings['search']['languages'] contains the languages codes and 'all'
2021-10-06plugins: refactor initializationAlexandre Flament
add a new function "init" call when the app starts. The function can: * return False to disable the plugin. * modify the Flask app.
2021-10-02SearXNG: environment variablesAlexandre Flament
2021-09-07[pylint] searx: drop no longer needed 'missing-function-docstring'Markus Heiser
Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914168470 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-02[mod] remove remaining references to locales in settings.ymlAlexandre Flament
see #247
2021-07-30version based on the git repositoryAlexandre Flament
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH: there are read from the git repository. It is possible to call python -m searx.version freeze to freeze the current version. Useful when the code is installed outside git (distro package, docker, etc...)
2021-07-27Merge pull request #216 from return42/fix-searx.shMarkus Heiser
normalize environment of installation tasks (shell) with YAML settings
2021-07-23[fix] /preferences: remove the empty engine category "social medias" (it is ↵Alexandre Flament
"social media")
2021-07-21[fix] utils/build_env.py and add documentationMarkus Heiser
modified docs/admin/engines/settings.rst - Fix documentation and add section 'brand'. - Add remarks about **buildenv** variables. - Add remarks about settings from environment variables $SEARX_DEBUG, $SEARX_PORT, $SEARX_BIND_ADDRESS and $SEARX_SECRET modified docs/admin/installation-searx.rst & docs/build-templates/searx.rst Fix template location /templates/etc/searx/settings.yml modified docs/dev/makefile.rst Add description of the 'make buildenv' target and describe - we have all SearXNG setups are centralized in the settings.yml file - why some tasks need a utils/brand.env (aka instance's buildenv) modified manage Settings file from repository's working tree are used by default and ask user if a /etc/searx/settings.yml file exists. modified searx/settings.yml Add comments about when it is needed to run 'make buildenv' modified searx/settings_defaults.py Default for server:port is taken from enviroment variable SEARX_PORT. modified utils/build_env.py - Some defaults in the settings.yml are taken from the environment, e.g. SEARX_BIND_ADDRESS (searx.settings_defaults.SHEMA). When the 'brand.env' file is created these enviroment variables should be unset first. - The CONTACT_URL enviroment is not needed in the utils/brand.env Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>