ソースを参照

[fix] setting category cookie expiration to 4 weeks

asciimoo 11 年 前
コミット
863d136ddd
共有1 個のファイルを変更した2 個の追加1 個の削除を含む
  1. 2
    1
      searx/webapp.py

+ 2
- 1
searx/webapp.py ファイルの表示

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