Browse Source

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

Adam Tauber 7 years ago
parent
commit
e303339370
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      searx/__init__.py

+ 3
- 0
searx/__init__.py View File

87
     logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
87
     logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
88
 
88
 
89
 logger.info('Initialisation done')
89
 logger.info('Initialisation done')
90
+
91
+if 'SEARX_SECRET' in environ:
92
+    settings['server']['secret_key'] = environ['SEARX_SECRET']