Browse Source

[fix] setting category cookie expiration to 4 weeks

asciimoo 11 years ago
parent
commit
863d136ddd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      searx/webapp.py

+ 2 - 1
searx/webapp.py

@@ -152,7 +152,8 @@ def preferences():
                 selected_categories.append(category)
                 selected_categories.append(category)
         if selected_categories:
         if selected_categories:
             resp = make_response(redirect('/'))
             resp = make_response(redirect('/'))
-            resp.set_cookie('categories', ','.join(selected_categories))
+            # cookie max age: 4 weeks
+            resp.set_cookie('categories', ','.join(selected_categories), max_age=60*60*24*7*4)
             return resp
             return resp
     return render('preferences.html')
     return render('preferences.html')