0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 14:08:23 -05:00

Apply suggestions from code review

This commit is contained in:
alamin655 2023-09-11 11:58:31 +05:30 committed by GitHub
parent 3c1aaf63f8
commit 0132a63e6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ pub struct AggregatorConfig {
pub random_delay: bool, pub random_delay: bool,
} }
/// Configuration options for the rate limter middleware. /// Configuration options for the rate limiter middleware.
/// ///
/// # Fields /// # Fields
/// ///

View File

@ -71,8 +71,8 @@ pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
.wrap(cors) .wrap(cors)
.wrap(Governor::new( .wrap(Governor::new(
&GovernorConfigBuilder::default() &GovernorConfigBuilder::default()
.per_second(config.rate_limter.time_limit as u64) .per_second(config.rate_limiter.time_limit as u64)
.burst_size(config.rate_limter.number_of_requests as u32) .burst_size(config.rate_limiter.number_of_requests as u32)
.finish() .finish()
.unwrap(), .unwrap(),
)) ))