logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 29dfd9679b11c68384ef5f90d1880780352037e6
parent: d2fd56612c9ba363732d4ed983967008b4684594
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Fri, 23 Oct 2015 23:07:36 +0200

[fix] use base_url in http redirects - closes #451

Diffstat:

searx/webapp.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 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