logo

searx

My custom branche(s) on searx, a meta-search engine
commit: e3033393709bce1070e2779d8fde6bc9626e5f16
parent: 9e5b1dfb7c49f8594f6da04d8595b68a7d030184
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Fri, 29 Dec 2017 09:13:29 +0100

[enh] overwrite secret_key from env with the SEARX_SECRET env var if exists - closes #845

Diffstat:

Msearx/__init__.py3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/searx/__init__.py b/searx/__init__.py @@ -87,3 +87,6 @@ if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2): logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION)) logger.info('Initialisation done') + +if 'SEARX_SECRET' in environ: + settings['server']['secret_key'] = environ['SEARX_SECRET']