self.kind(RateLimitType::Register)
}
+ pub fn image(&self) -> RateLimited {
+ self.kind(RateLimitType::Image)
+ }
+
fn kind(&self, type_: RateLimitType) -> RateLimited {
RateLimited {
rate_limiter: self.rate_limiter.clone(),
true,
)?;
}
+ RateLimitType::Image => {
+ limiter.check_rate_limit_full(
+ self.type_,
+ &ip_addr,
+ rate_limit.image,
+ rate_limit.image_per_second,
+ false,
+ )?;
+ }
};
}