mirror of
https://github.com/searx/searx
synced 2024-12-11 08:25:27 +01:00
improve https rewriting
This commit is contained in:
parent
6e6dbc1bb4
commit
0616d26feb
@ -24,5 +24,7 @@ else:
|
|||||||
with open(settings_path) as settings_yaml:
|
with open(settings_path) as settings_yaml:
|
||||||
settings = load(settings_yaml)
|
settings = load(settings_yaml)
|
||||||
|
|
||||||
# loade https rules
|
# load https rules only if https rewrite is enabled
|
||||||
load_https_rules(https_rewrite_path)
|
if settings.get('server', {}).get('https_rewrite'):
|
||||||
|
# loade https rules
|
||||||
|
load_https_rules(https_rewrite_path)
|
||||||
|
@ -247,6 +247,9 @@ def index():
|
|||||||
# set new url
|
# set new url
|
||||||
result['url'] = new_result_url
|
result['url'] = new_result_url
|
||||||
|
|
||||||
|
# target has matched, do not search over the other rules
|
||||||
|
break
|
||||||
|
|
||||||
if search.request_data.get('format', 'html') == 'html':
|
if search.request_data.get('format', 'html') == 'html':
|
||||||
if 'content' in result:
|
if 'content' in result:
|
||||||
result['content'] = highlight_content(result['content'],
|
result['content'] = highlight_content(result['content'],
|
||||||
|
Loading…
Reference in New Issue
Block a user