Increase the number of request/s for sign_in/sign_up

This commit is contained in:
Greg Burri 2025-03-11 14:42:13 +01:00
parent a90c097e2a
commit ec582ad68f
2 changed files with 4 additions and 2 deletions

View file

@ -18,8 +18,8 @@ pub const TOKEN_SIZE: usize = 32;
pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60); pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60);
pub const NUMBER_OF_CONCURRENT_HTTP_REQUEST_FOR_RATE_LIMIT: u64 = 20; pub const NUMBER_OF_CONCURRENT_HTTP_REQUEST_FOR_RATE_LIMIT: u64 = 10;
pub const DURATION_FOR_RATE_LIMIT: Duration = Duration::from_secs(5); pub const DURATION_FOR_RATE_LIMIT: Duration = Duration::from_secs(2);
// HTTP headers, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers. // HTTP headers, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers.
// Common headers can be found in 'axum::http::header' (which is a re-export of the create 'http'). // Common headers can be found in 'axum::http::header' (which is a re-export of the create 'http').

View file

@ -6,6 +6,8 @@ use argon2::{
}; };
fn get_argon2<'k>() -> Argon2<'k> { fn get_argon2<'k>() -> Argon2<'k> {
// Note: It's not neccessary to have only one Argon2 object, creating a new one
// when we need it is lightweight.
Argon2::new( Argon2::new(
argon2::Algorithm::Argon2id, argon2::Algorithm::Argon2id,
argon2::Version::V0x13, argon2::Version::V0x13,