mirror of
https://github.com/searx/searx
synced 2025-02-12 09:50:51 +01:00
[mod] disable /stats page by default to prevent potential data leak
This commit is contained in:
parent
6cd3bf376f
commit
9b5415ea2f
@ -2,6 +2,7 @@ general:
|
||||
debug : False # Debug mode, only for development
|
||||
instance_name : "searx" # displayed name
|
||||
contact_url: False # mailto:contact@example.com
|
||||
enable_stats: False # activate /stats page - note: it may leak usage data
|
||||
|
||||
brand:
|
||||
git_url: https://github.com/searx/searx
|
||||
|
@ -978,6 +978,8 @@ def image_proxy():
|
||||
@app.route('/stats', methods=['GET'])
|
||||
def stats():
|
||||
"""Render engine statistics page."""
|
||||
if not settings['general'].get('enable_stats'):
|
||||
return page_not_found(None)
|
||||
stats = get_engines_stats(request.preferences)
|
||||
return render(
|
||||
'stats.html',
|
||||
|
Loading…
x
Reference in New Issue
Block a user