mirror of https://github.com/searxng/searxng.git
[fix] settings_loader: don't crash when a key exists only in the user settings
typical use case: result_proxy can be defined in the user settings, but are not defined the default settings.yml
This commit is contained in:
parent
89fbb85d45
commit
d0d7a3e1c2
|
@ -57,7 +57,10 @@ def update_settings(default_settings, user_settings):
|
|||
# merge everything except the engines
|
||||
for k, v in user_settings.items():
|
||||
if k not in ('use_default_settings', 'engines'):
|
||||
update_dict(default_settings[k], v)
|
||||
if k in default_settings:
|
||||
update_dict(default_settings[k], v)
|
||||
else:
|
||||
default_settings[k] = v
|
||||
|
||||
# parse the engines
|
||||
remove_engines = None
|
||||
|
|
|
@ -4,3 +4,6 @@ server:
|
|||
bind_address: "0.0.0.0"
|
||||
default_http_headers:
|
||||
Custom-Header: Custom-Value
|
||||
result_proxy:
|
||||
url : https://localhost/morty
|
||||
key : "$ecretKey"
|
||||
|
|
Loading…
Reference in New Issue