mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
fix: only show and clear known cookies. closes #3763
This commit is contained in:
parent
c1bb0bebd4
commit
30ea333246
2 changed files with 8 additions and 5 deletions
|
@ -10,10 +10,12 @@
|
|||
<th>{{ _('Value') }}</th>{{- '' -}}
|
||||
</tr>
|
||||
{%- for cookie in cookies -%}
|
||||
<tr>{{- '' -}}
|
||||
<td>{{ cookie }}</td>{{- '' -}}
|
||||
<td>{{ cookies[cookie] }}</td>{{- '' -}}
|
||||
</tr>
|
||||
{% if cookie in preferences.key_value_settings %}
|
||||
<tr>{{- '' -}}
|
||||
<td>{{ cookie }}</td>{{- '' -}}
|
||||
<td>{{ cookies[cookie] }}</td>{{- '' -}}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{%- endfor -%}
|
||||
</table>
|
||||
{%- else -%}
|
||||
|
|
|
@ -1289,7 +1289,8 @@ def favicon():
|
|||
def clear_cookies():
|
||||
resp = make_response(redirect(url_for('index', _external=True)))
|
||||
for cookie_name in request.cookies:
|
||||
resp.delete_cookie(cookie_name)
|
||||
if cookie_name in request.preferences.key_value_settings:
|
||||
resp.delete_cookie(cookie_name)
|
||||
return resp
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue