mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
[mod] https rewrite pluginification
This commit is contained in:
@@ -36,11 +36,6 @@ if 'SEARX_SETTINGS_PATH' in environ:
|
||||
else:
|
||||
settings_path = join(searx_dir, 'settings.yml')
|
||||
|
||||
if 'SEARX_HTTPS_REWRITE_PATH' in environ:
|
||||
https_rewrite_path = environ['SEARX_HTTPS_REWRITE_PATH']
|
||||
else:
|
||||
https_rewrite_path = join(searx_dir, 'https_rules')
|
||||
|
||||
# load settings
|
||||
with open(settings_path) as settings_yaml:
|
||||
settings = load(settings_yaml)
|
||||
@@ -52,10 +47,4 @@ else:
|
||||
|
||||
logger = logging.getLogger('searx')
|
||||
|
||||
# load https rules only if https rewrite is enabled
|
||||
if settings.get('server', {}).get('https_rewrite'):
|
||||
# loade https rules
|
||||
from searx.https_rewrite import load_https_rules
|
||||
load_https_rules(https_rewrite_path)
|
||||
|
||||
logger.info('Initialisation done')
|
||||
|
||||
Reference in New Issue
Block a user