mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-06-20 07:32:40 +02:00
feat: use a in memory map to count requests for ips and log the n most active each hour
This commit is contained in:
parent
023ea17492
commit
b22d3665a9
7 changed files with 74 additions and 20 deletions
10
cli/flags.go
10
cli/flags.go
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue