diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-12-28 20:00:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-28 20:00:53 +0100 |
commit | 8bff42f049dcac77559beaf2932a47921feb1d49 (patch) | |
tree | 00fd6b0b14773c0e20425d4a6478d67f244d64ed /searx/webapp.py | |
parent | f30d5e87938275219852c94d57771e182bfa435b (diff) | |
parent | ea034fafa994227ea89662710901e73cb901e28c (diff) | |
download | searxng-8bff42f049dcac77559beaf2932a47921feb1d49.tar.gz searxng-8bff42f049dcac77559beaf2932a47921feb1d49.zip |
Merge branch 'master' into languages
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index b124aa75d..1682015cf 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -53,7 +53,7 @@ from flask_babel import Babel, gettext, format_date, format_decimal from flask.json import jsonify from searx import settings, searx_dir, searx_debug from searx.engines import ( - categories, engines, get_engines_stats, engine_shortcuts + categories, engines, engine_shortcuts, get_engines_stats, initialize_engines ) from searx.utils import ( UnicodeWriter, highlight_content, html_to_text, get_themes, @@ -81,7 +81,7 @@ except ImportError: # serve pages with HTTP/1.1 from werkzeug.serving import WSGIRequestHandler -WSGIRequestHandler.protocol_version = "HTTP/1.1" +WSGIRequestHandler.protocol_version = "HTTP/{}".format(settings['server'].get('http_protocol_version', '1.0')) static_path, templates_path, themes =\ get_themes(settings['ui']['themes_path'] @@ -769,6 +769,9 @@ def page_not_found(e): def run(): + if not searx_debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true": + initialize_engines(settings['engines']) + app.run( debug=searx_debug, use_debugger=searx_debug, |