diff options
| -rw-r--r-- | searx/__init__.py | 21 | ||||
| -rw-r--r-- | searx/settings.yml | 4 | ||||
| -rw-r--r-- | searx/templates/courgette/about.html | 2 | ||||
| -rw-r--r-- | searx/templates/legacy/about.html | 2 | ||||
| -rw-r--r-- | searx/templates/oscar/about.html | 2 | ||||
| -rw-r--r-- | searx/templates/oscar/result_templates/images.html | 4 | ||||
| -rw-r--r-- | searx/templates/pix-art/about.html | 2 | ||||
| -rw-r--r-- | searx/webapp.py | 6 |
8 files changed, 31 insertions, 12 deletions
diff --git a/searx/__init__.py b/searx/__init__.py index 7b67a394f..b3abc61ae 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -42,7 +42,26 @@ else: with open(settings_path) as settings_yaml: settings = load(settings_yaml) -if settings.get('general', {}).get('debug'): +''' +enable debug if +the environnement variable SEARX_DEBUG is 1 or true +(whatever the value in settings.yml) +or general.debug=True in settings.yml + +disable debug if +the environnement variable SEARX_DEBUG is 0 or false +(whatever the value in settings.yml) +or general.debug=False in settings.yml +''' +searx_debug_env = environ.get('SEARX_DEBUG', '').lower() +if searx_debug_env == 'true' or searx_debug_env == '1': + searx_debug = True +elif searx_debug_env == 'false' or searx_debug_env == '0': + searx_debug = False +else: + searx_debug = settings.get('general', {}).get('debug') + +if searx_debug: logging.basicConfig(level=logging.DEBUG) else: logging.basicConfig(level=logging.WARNING) diff --git a/searx/settings.yml b/searx/settings.yml index ba7ae428b..139034590 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -437,8 +437,8 @@ engines: - name : ixquick engine : startpage - base_url : 'https://www.ixquick.com/' - search_url : 'https://www.ixquick.com/do/search' + base_url : 'https://www.ixquick.eu/' + search_url : 'https://www.ixquick.eu/do/search' shortcut : iq timeout : 6.0 disabled : True diff --git a/searx/templates/courgette/about.html b/searx/templates/courgette/about.html index 3855d4682..faa7b6138 100644 --- a/searx/templates/courgette/about.html +++ b/searx/templates/courgette/about.html @@ -18,7 +18,7 @@ <h2>Technical details - How does it work?</h2> <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, -inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> +inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.<br /> It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, searx uses the search bar to perform GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/templates/legacy/about.html b/searx/templates/legacy/about.html index 45fb0e449..580321e47 100644 --- a/searx/templates/legacy/about.html +++ b/searx/templates/legacy/about.html @@ -18,7 +18,7 @@ <h2>Technical details - How does it work?</h2> <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, -inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> +inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.<br /> It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, if searx used from the search bar it performs GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/templates/oscar/about.html b/searx/templates/oscar/about.html index d42b783c7..743d48074 100644 --- a/searx/templates/oscar/about.html +++ b/searx/templates/oscar/about.html @@ -19,7 +19,7 @@ <h2>Technical details - How does it work?</h2> <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, -inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> +inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.<br /> It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, searx uses the search bar to perform GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 812749c47..f7bcf0786 100644 --- a/searx/templates/oscar/result_templates/images.html +++ b/searx/templates/oscar/result_templates/images.html @@ -1,10 +1,10 @@ {% from 'oscar/macros.html' import draw_favicon %}
-<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} data-toggle="modal" data-target="#modal-{{ index }}">
+<a href="{{ result.img_src }}" {% if results_on_new_tab %}target="_blank" rel="noopener noreferrer"{% else %}rel="noreferrer"{% endif %} data-toggle="modal" data-target="#modal-{{ index }}-{{pageno}}">
<img src="{% if result.thumbnail_src %}{{ image_proxify(result.thumbnail_src) }}{% else %}{{ image_proxify(result.img_src) }}{% endif %}" alt="{{ result.title|striptags }}" title="{{ result.title|striptags }}" class="img-thumbnail">
</a>
-<div class="modal fade" id="modal-{{ index }}" tabindex="-1" role="dialog" aria-hidden="true">
+<div class="modal fade" id="modal-{{ index }}-{{ pageno }}" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-wrapper">
<div class="modal-header">
diff --git a/searx/templates/pix-art/about.html b/searx/templates/pix-art/about.html index 6484b8526..041b036f2 100644 --- a/searx/templates/pix-art/about.html +++ b/searx/templates/pix-art/about.html @@ -17,7 +17,7 @@ <h2>Technical details - How does it work?</h2> <p>Searx is a <a href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch engine</a>, -inspired by the <a href="http://seeks-project.info/">seeks project</a>.<br /> +inspired by the <a href="https://beniz.github.io/seeks/">seeks project</a>.<br /> It provides basic privacy by mixing your queries with searches on other platforms without storing search data. Queries are made using a POST request on every browser (except chrome*). Therefore they show up in neither our logs, nor your url history. In case of Chrome* users there is an exception, if searx used from the search bar it performs GET requests.<br /> Searx can be added to your browser's search bar; moreover, it can be set as the default search engine. </p> diff --git a/searx/webapp.py b/searx/webapp.py index 960d6133c..860208cd2 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -51,7 +51,7 @@ from flask import ( ) from flask_babel import Babel, gettext, format_date, format_decimal from flask.json import jsonify -from searx import settings, searx_dir +from searx import settings, searx_dir, searx_debug from searx.engines import ( categories, engines, get_engines_stats, engine_shortcuts ) @@ -746,8 +746,8 @@ def page_not_found(e): def run(): app.run( - debug=settings['general']['debug'], - use_debugger=settings['general']['debug'], + debug=searx_debug, + use_debugger=searx_debug, port=settings['server']['port'], host=settings['server']['bind_address'], threaded=True |