diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-10-23 23:07:36 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-10-23 23:07:36 +0200 |
commit | 29dfd9679b11c68384ef5f90d1880780352037e6 (patch) | |
tree | c4014f93c764773775f913bf7088ad9c83ec0dbe | |
parent | d2fd56612c9ba363732d4ed983967008b4684594 (diff) | |
download | searxng-29dfd9679b11c68384ef5f90d1880780352037e6.tar.gz searxng-29dfd9679b11c68384ef5f90d1880780352037e6.zip |
[fix] use base_url in http redirects - closes #451
-rw-r--r-- | searx/webapp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 07750456d..794b7ea8c 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -42,7 +42,7 @@ except: from datetime import datetime, timedelta from urllib import urlencode -from urlparse import urlparse +from urlparse import urlparse, urljoin from werkzeug.contrib.fixers import ProxyFix from flask import ( Flask, request, render_template, url_for, Response, make_response, @@ -531,7 +531,7 @@ def preferences(): blocked_engines = [] - resp = make_response(redirect(url_for('index'))) + resp = make_response(redirect(urljoin(settings['server']['base_url'], url_for('index')))) if request.method == 'GET': blocked_engines = get_blocked_engines(engines, request.cookies) @@ -766,7 +766,7 @@ def favicon(): @app.route('/clear_cookies') def clear_cookies(): - resp = make_response(redirect(url_for('index'))) + resp = make_response(redirect(urljoin(settings['server']['base_url'], url_for('index')))) for cookie_name in request.cookies: resp.delete_cookie(cookie_name) return resp |