From 2bf297b19ffe00415f5d9b36d66dd6b24f5bb58d Mon Sep 17 00:00:00 2001
From: Markus Heiser
Date: Mon, 12 Apr 2021 15:29:08 +0200
Subject: [PATCH 1/2] [fix] redirect when saving preferences
Erroneously commit 87e4c4762 droped the 302 redirect.
Signed-off-by: Markus Heiser
---
searx/webapp.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/searx/webapp.py b/searx/webapp.py
index 072f140c..8058c6cd 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -813,7 +813,7 @@ def preferences():
# save preferences
if request.method == 'POST':
- resp = make_response(url_for('index', _external=True))
+ resp = make_response(redirect(url_for('index', _external=True)))
try:
request.preferences.parse_form(request.form)
except ValidationException:
From c4793afadcabe3c4560afb5179f92c6c440d4c5e Mon Sep 17 00:00:00 2001
From: Markus Heiser
Date: Mon, 12 Apr 2021 16:02:16 +0200
Subject: [PATCH 2/2] [fix] https-scheme missing in preferences-page
This patch is an addition to PR #2656 which removed all usage of `base_url` from
the templates, except one was forgotten in the cookie URL of the preferences.
closes: 2740
Signed-off-by: Markus Heiser
---
searx/templates/oscar/preferences.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index 3f9192e2..2602c19d 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -368,7 +368,7 @@