0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-21 05:38:20 -05:00

♻️ refactor: replace deprecated per_second with seconds_per_request in rate-limiting middleware code (#616)

This commit is contained in:
Jurijs Bibicevs 2024-10-06 18:30:11 +02:00 committed by GitHub
parent c796ae8bb7
commit 959d0c52b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,7 +91,7 @@ pub fn run(
.wrap(cors)
.wrap(Governor::new(
&GovernorConfigBuilder::default()
.per_second(config.rate_limiter.time_limit as u64)
.seconds_per_request(config.rate_limiter.time_limit as u64)
.burst_size(config.rate_limiter.number_of_requests as u32)
.finish()
.unwrap(),