pub const SEND_EMAIL_TIMEOUT: Duration = Duration::from_secs(60);
-pub const NUMBER_OF_CONCURRENT_HTTP_REQUEST_FOR_RATE_LIMIT: u64 = 20;
-pub const DURATION_FOR_RATE_LIMIT: Duration = Duration::from_secs(5);
+pub const NUMBER_OF_CONCURRENT_HTTP_REQUEST_FOR_RATE_LIMIT: u64 = 10;
+pub const DURATION_FOR_RATE_LIMIT: Duration = Duration::from_secs(2);
// 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').
};
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::Algorithm::Argon2id,
argon2::Version::V0x13,