mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-07-16 22:13:30 +02:00
Added some ratelimiting middleware
This commit is contained in:
@ -45,3 +45,19 @@ template_location = "templates"
|
||||
|
||||
# Prefixes of user agents that should get a text reponse by default
|
||||
text_user_agents = ["curl/"]
|
||||
|
||||
[ratelimit]
|
||||
# Configure a Quota for the Rate limiter
|
||||
|
||||
# Please note that this depends on the ip_header being
|
||||
# configured correctly!
|
||||
|
||||
# How many requests per minute are allowed
|
||||
# (How fast the leaky bucket drains)
|
||||
per_minute = 20
|
||||
# How many requests may come in at once
|
||||
# (How much capacity the leaky bucket has)
|
||||
burst = 15
|
||||
|
||||
#Note: The ratelimit is implemented using the governor crate
|
||||
|
||||
|
Reference in New Issue
Block a user