summaryrefslogtreecommitdiff
path: root/searx/__init__.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2017-12-29 09:13:29 +0100
committerAdam Tauber <asciimoo@gmail.com>2017-12-29 09:13:50 +0100
commite3033393709bce1070e2779d8fde6bc9626e5f16 (patch)
tree491c1db54f50de250b4fdde065b4fdb057ae8a00 /searx/__init__.py
parent9e5b1dfb7c49f8594f6da04d8595b68a7d030184 (diff)
downloadsearxng-e3033393709bce1070e2779d8fde6bc9626e5f16.tar.gz
searxng-e3033393709bce1070e2779d8fde6bc9626e5f16.zip
[enh] overwrite secret_key from env with the SEARX_SECRET env var if exists - closes #845
Diffstat (limited to 'searx/__init__.py')
-rw-r--r--searx/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/__init__.py b/searx/__init__.py
index a57588cd3..9cb832266 100644
--- 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']