mirror of
https://github.com/searxng/searxng.git
synced 2025-07-19 03:09:25 +02:00
Remove usage of SEARX environment variables
This commit is contained in:
parent
56000d5162
commit
4adc9920e9
3 changed files with 21 additions and 36 deletions
|
@ -41,16 +41,6 @@ STR_TO_BOOL = {
|
|||
}
|
||||
_UNDEFINED = object()
|
||||
|
||||
# compatibility
|
||||
SEARX_ENVIRON_VARIABLES = {
|
||||
'SEARX_DISABLE_ETC_SETTINGS': 'SEARXNG_DISABLE_ETC_SETTINGS',
|
||||
'SEARX_SETTINGS_PATH': 'SEARXNG_SETTINGS_PATH',
|
||||
'SEARX_DEBUG': 'SEARXNG_DEBUG',
|
||||
'SEARX_PORT': 'SEARXNG_PORT',
|
||||
'SEARX_BIND_ADDRESS': 'SEARXNG_BIND_ADDRESS',
|
||||
'SEARX_SECRET': 'SEARXNG_SECRET',
|
||||
}
|
||||
|
||||
|
||||
class SettingsValue:
|
||||
"""Check and update a setting value"""
|
||||
|
@ -227,11 +217,5 @@ SCHEMA = {
|
|||
|
||||
|
||||
def settings_set_defaults(settings):
|
||||
# compatibility with searx variables
|
||||
for searx, searxng in SEARX_ENVIRON_VARIABLES.items():
|
||||
if searx in os.environ and searxng not in os.environ:
|
||||
os.environ[searxng] = os.environ[searx]
|
||||
logger.warning('%s uses value from %s', searxng, searx)
|
||||
|
||||
apply_schema(settings, SCHEMA, [])
|
||||
return settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue