Sfoglia il codice sorgente

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

Adam Tauber 7 anni fa
parent
commit
e303339370
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3
    0
      searx/__init__.py

+ 3
- 0
searx/__init__.py Vedi File

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