We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_useragent_or_ip_blocked()
1 parent 9094938 commit b0a06aeCopy full SHA for b0a06ae
src/controllers/helpers/pagination.rs
@@ -317,9 +317,9 @@ impl RawSeekPayload {
317
///
318
/// A request can be blocked if either the User Agent is on the User Agent block list or if the client
319
/// IP is on the CIDR block list.
320
-fn is_useragent_or_ip_blocked<T: RequestPartsExt>(config: &Server, req: &T) -> bool {
321
- let user_agent = req.headers().get_str_or_default(header::USER_AGENT);
322
- let client_ip = req.extensions().get::<RealIp>();
+fn is_useragent_or_ip_blocked(config: &Server, req: &Parts) -> bool {
+ let user_agent = req.headers.get_str_or_default(header::USER_AGENT);
+ let client_ip = req.extensions.get::<RealIp>();
323
324
// check if user agent is blocked
325
if config
0 commit comments