feat: use a in memory map to count requests for ips and log the n most active each hour

This commit is contained in:
crapStone 2025-06-13 23:18:01 +02:00
parent 023ea17492
commit b22d3665a9
No known key found for this signature in database
GPG key ID: 22D4BF0CF7CC29C8
7 changed files with 74 additions and 20 deletions

View file

@ -115,11 +115,11 @@ var (
EnvVars: []string{"USE_PROXY_PROTOCOL"},
Value: false,
},
&cli.BoolFlag{
Name: "log-every-request",
Usage: "logs every request with reqID, host and path",
EnvVars: []string{"LOG_EVERY_REQUEST"},
Value: false,
&cli.UintFlag{
Name: "log-most-active-ips",
Usage: "logs a the n most active IPs every hour",
EnvVars: []string{"LOG_MOST_ACTIVE_IPS"},
Value: 10,
},
// Default branches to fetch assets from