mirror of https://github.com/searx/searx
Merge pull request #2256 from kvch/force-setting-secret-key
Force admins to set secret_key if debug mode is disabled
This commit is contained in:
commit
e78bfd4d8b
|
@ -85,3 +85,7 @@ if 'SEARX_SECRET' in environ:
|
||||||
settings['server']['secret_key'] = environ['SEARX_SECRET']
|
settings['server']['secret_key'] = environ['SEARX_SECRET']
|
||||||
if 'SEARX_BIND_ADDRESS' in environ:
|
if 'SEARX_BIND_ADDRESS' in environ:
|
||||||
settings['server']['bind_address'] = environ['SEARX_BIND_ADDRESS']
|
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)
|
||||||
|
|
|
@ -8,7 +8,7 @@ search:
|
||||||
server:
|
server:
|
||||||
port : 11111
|
port : 11111
|
||||||
bind_address : 127.0.0.1
|
bind_address : 127.0.0.1
|
||||||
secret_key : "ultrasecretkey" # change this!
|
secret_key : "changedultrasecretkey"
|
||||||
base_url : False
|
base_url : False
|
||||||
http_protocol_version : "1.0"
|
http_protocol_version : "1.0"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
import os
|
||||||
|
os.environ['SEARX_DEBUG'] = '1'
|
Loading…
Reference in New Issue