Spaces:
Running
Running
Jurijs Bibicevs
commited on
:recycle: refactor: replace deprecated `per_second` with `seconds_per_request` in rate-limiting middleware code (#616)
Browse files- src/lib.rs +1 -1
src/lib.rs
CHANGED
@@ -91,7 +91,7 @@ pub fn run(
|
|
91 |
.wrap(cors)
|
92 |
.wrap(Governor::new(
|
93 |
&GovernorConfigBuilder::default()
|
94 |
-
.
|
95 |
.burst_size(config.rate_limiter.number_of_requests as u32)
|
96 |
.finish()
|
97 |
.unwrap(),
|
|
|
91 |
.wrap(cors)
|
92 |
.wrap(Governor::new(
|
93 |
&GovernorConfigBuilder::default()
|
94 |
+
.seconds_per_request(config.rate_limiter.time_limit as u64)
|
95 |
.burst_size(config.rate_limiter.number_of_requests as u32)
|
96 |
.finish()
|
97 |
.unwrap(),
|