mirror of
https://github.com/searxng/searxng.git
synced 2025-07-22 20:59:16 +02:00
Force admins to set secret_key if debug mode is disabled
This commit also enables debug mode for unit tests.
This commit is contained in:
parent
e158eeee4b
commit
116f7a6daa
3 changed files with 7 additions and 1 deletions
|
@ -85,3 +85,7 @@ if 'SEARX_SECRET' in environ:
|
|||
settings['server']['secret_key'] = environ['SEARX_SECRET']
|
||||
if 'SEARX_BIND_ADDRESS' in environ:
|
||||
settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS']
|
||||
|
||||
if not searx_debug and settings['server']['secret_key'] == 'ultrasecretkey':
|
||||
logger.error('server.secret_key is not changed. Please use something else instead of ultrasecretkey.')
|
||||
exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue