docs(config): add dashboard statistics examples

This commit is contained in:
Aethersailor
2026-05-26 19:38:21 +08:00
parent 69c4145010
commit 8c214c028d
3 changed files with 33 additions and 0 deletions

View File

@@ -175,6 +175,16 @@ flush_interval=5
;none records all countries as unknown.
geo_provider=header
country_headers=CF-IPCountry,X-Geo-Country,X-Vercel-IP-Country,CloudFront-Viewer-Country
;Optional Basic authentication for /dashboard and /dashboard/data.
;Only applies when statistics enabled=true.
;Missing or false keeps the dashboard password disabled.
dashboard_auth_enabled=false
dashboard_auth_username=
dashboard_auth_password=
;Failed login attempts allowed within dashboard_auth_window_seconds before lock applies.
dashboard_auth_max_failures=5
dashboard_auth_window_seconds=300
dashboard_auth_lock_seconds=900
[emojis]
add_emoji=false

View File

@@ -198,6 +198,18 @@ flush_interval = 5
provider = "header"
country_headers = ["CF-IPCountry", "X-Geo-Country", "X-Vercel-IP-Country", "CloudFront-Viewer-Country"]
[statistics.dashboard_auth]
# Optional Basic authentication for /dashboard and /dashboard/data.
# Only applies when statistics.enabled is true.
# Missing or false keeps the dashboard password disabled.
enabled = false
username = ""
password = ""
# Failed login attempts allowed within window_seconds before lock_seconds applies.
max_failures = 5
window_seconds = 300
lock_seconds = 900
[emojis]
add_emoji = false
remove_old_emoji = true

View File

@@ -95,6 +95,17 @@ statistics:
# none records all countries as unknown.
provider: header
country_headers: ["CF-IPCountry", "X-Geo-Country", "X-Vercel-IP-Country", "CloudFront-Viewer-Country"]
dashboard_auth:
# Optional Basic authentication for /dashboard and /dashboard/data.
# Only applies when statistics.enabled is true.
# Missing or false keeps the dashboard password disabled.
enabled: false
username: ""
password: ""
# Failed login attempts allowed within window_seconds before lock_seconds applies.
max_failures: 5
window_seconds: 300
lock_seconds: 900
emojis:
add_emoji: false