[enh] overwrite secret_key from env with the SEARX_SECRET env var if exists - closes #845
commite3033393709bce1070e2779d8fde6bc9626e5f16
authorAdam Tauber <asciimoo@gmail.com>
dateFri 29 Dec 2017, 09:13 (9 years ago)
parent9e5b1df
searx/__init__.py+3
@@ -87,3 +87,6 @@ if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
8787 logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
8888
8989logger.info('Initialisation done')
90+
91+if 'SEARX_SECRET' in environ:
92+ settings['server']['secret_key'] = environ['SEARX_SECRET']