From 56786a18f16d7054b6677926f9f21afd073412fd Mon Sep 17 00:00:00 2001 From: Karbob Date: Tue, 22 Nov 2022 22:12:06 +0800 Subject: [PATCH] Update settings description Update description to `admin login requests`. --- .env.template | 2 +- src/config.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.template b/.env.template index 1e5ff101..ca087cd0 100644 --- a/.env.template +++ b/.env.template @@ -302,7 +302,7 @@ ## Note that this applies to both the login and the 2FA, so it's recommended to allow a burst size of at least 2. # LOGIN_RATELIMIT_MAX_BURST=10 -## Number of seconds, on average, between admin requests from the same IP address before rate limiting kicks in. +## Number of seconds, on average, between admin login requests from the same IP address before rate limiting kicks in. # ADMIN_RATELIMIT_SECONDS=300 ## Allow a burst of requests of up to this size, while maintaining the average indicated by `ADMIN_RATELIMIT_SECONDS`. # ADMIN_RATELIMIT_MAX_BURST=3 diff --git a/src/config.rs b/src/config.rs index 9c31d231..16161def 100644 --- a/src/config.rs +++ b/src/config.rs @@ -543,9 +543,9 @@ make_config! { /// Max burst size for login requests |> Allow a burst of requests of up to this size, while maintaining the average indicated by `login_ratelimit_seconds`. Note that this applies to both the login and the 2FA, so it's recommended to allow a burst size of at least 2 login_ratelimit_max_burst: u32, false, def, 10; - /// Seconds between admin requests |> Number of seconds, on average, between admin requests from the same IP address before rate limiting kicks in + /// Seconds between admin login requests |> Number of seconds, on average, between admin requests from the same IP address before rate limiting kicks in admin_ratelimit_seconds: u64, false, def, 300; - /// Max burst size for login requests |> Allow a burst of requests of up to this size, while maintaining the average indicated by `admin_ratelimit_seconds` + /// Max burst size for admin login requests |> Allow a burst of requests of up to this size, while maintaining the average indicated by `admin_ratelimit_seconds` admin_ratelimit_max_burst: u32, false, def, 3; },