Skip to content

Commit

Permalink
refactor: replace deprecated per_second with seconds_per_request in r…
Browse files Browse the repository at this point in the history
…ate-limiting middleware
  • Loading branch information
jurijsb committed Oct 6, 2024
1 parent c796ae8 commit 36c65e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 36c65e1

Please sign in to comment.