mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-06-20 20:31:34 +00: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
|
@ -72,8 +72,9 @@ func mergeServerConfig(ctx *cli.Context, config *ServerConfig) {
|
|||
if ctx.IsSet("use-proxy-protocol") {
|
||||
config.UseProxyProtocol = ctx.Bool("use-proxy-protocol")
|
||||
}
|
||||
if ctx.IsSet("log-every-request") {
|
||||
config.LogEveryRequest = ctx.Bool("log-every-request")
|
||||
if ctx.IsSet("log-most-active-ips") {
|
||||
config.LogMostActiveIps = true
|
||||
config.MostActiveIpCount = ctx.Uint("log-most-active-ips")
|
||||
}
|
||||
|
||||
if ctx.IsSet("pages-domain") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue