summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/searx/search.py b/searx/search.py
index 1b16ee02f..79a8ae0a9 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -457,6 +457,11 @@ class Search(object):
request_params['started'] = time()
request_params['pageno'] = self.pageno
request_params['language'] = self.lang
+ try:
+ # 0 = None, 1 = Moderate, 2 = Strict
+ request_params['safesearch'] = int(request.cookies.get('safesearch', 1))
+ except ValueError:
+ request_params['safesearch'] = 1
# update request parameters dependent on
# search-engine (contained in engines folder)