mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-11-21 21:48:21 -05:00
Apply suggestions from code review
This commit is contained in:
parent
3c1aaf63f8
commit
0132a63e6f
@ -48,7 +48,7 @@ pub struct AggregatorConfig {
|
||||
pub random_delay: bool,
|
||||
}
|
||||
|
||||
/// Configuration options for the rate limter middleware.
|
||||
/// Configuration options for the rate limiter middleware.
|
||||
///
|
||||
/// # Fields
|
||||
///
|
||||
|
@ -71,8 +71,8 @@ pub fn run(listener: TcpListener, config: Config) -> std::io::Result<Server> {
|
||||
.wrap(cors)
|
||||
.wrap(Governor::new(
|
||||
&GovernorConfigBuilder::default()
|
||||
.per_second(config.rate_limter.time_limit as u64)
|
||||
.burst_size(config.rate_limter.number_of_requests as u32)
|
||||
.per_second(config.rate_limiter.time_limit as u64)
|
||||
.burst_size(config.rate_limiter.number_of_requests as u32)
|
||||
.finish()
|
||||
.unwrap(),
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user