feat: add option to log the n most active IPs each hour (#496)

Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/496
Co-authored-by: crapStone <me@crapstone.dev>
Co-committed-by: crapStone <me@crapstone.dev>
This commit is contained in:
crapStone 2025-06-25 22:12:33 +02:00 committed by crapStone
parent d27c594c28
commit 5477ba2c46
8 changed files with 97 additions and 5 deletions

View file

@ -72,6 +72,10 @@ func mergeServerConfig(ctx *cli.Context, config *ServerConfig) {
if ctx.IsSet("use-proxy-protocol") {
config.UseProxyProtocol = ctx.Bool("use-proxy-protocol")
}
if ctx.IsSet("log-most-active-ips") {
config.LogMostActiveIps = true
config.MostActiveIpCount = ctx.Uint("log-most-active-ips")
}
if ctx.IsSet("pages-domain") {
config.MainDomain = ctx.String("pages-domain")