|
|
@@ -109,7 +109,9 @@ public class BlacklistService {
|
|
|
return Mono.just(false);
|
|
|
}
|
|
|
Mono<Long> increment = reactiveRedisTemplate.opsForValue().increment(keys);
|
|
|
+ Mono<Boolean> expire = reactiveRedisTemplate.expire(keys, Duration.ofMinutes(secondsUntilNextMidnight));
|
|
|
return increment.flatMap(num->{
|
|
|
+ expire.subscribe();
|
|
|
if (num > ipRateLimitRange.get()) {
|
|
|
return Mono.just(false);
|
|
|
}
|