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>{{- '' -}}
|
<th>{{ _('Value') }}</th>{{- '' -}}
|
||||||
</tr>
|
</tr>
|
||||||
{%- for cookie in cookies -%}
|
{%- for cookie in cookies -%}
|
||||||
<tr>{{- '' -}}
|
{% if cookie in preferences.key_value_settings %}
|
||||||
<td>{{ cookie }}</td>{{- '' -}}
|
<tr>{{- '' -}}
|
||||||
<td>{{ cookies[cookie] }}</td>{{- '' -}}
|
<td>{{ cookie }}</td>{{- '' -}}
|
||||||
</tr>
|
<td>{{ cookies[cookie] }}</td>{{- '' -}}
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
</table>
|
</table>
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
|
|
|
@ -1289,7 +1289,8 @@ def favicon():
|
||||||
def clear_cookies():
|
def clear_cookies():
|
||||||
resp = make_response(redirect(url_for('index', _external=True)))
|
resp = make_response(redirect(url_for('index', _external=True)))
|
||||||
for cookie_name in request.cookies:
|
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
|
return resp
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue