Skip to content

Commit b0a06ae

Browse files
committed
controllers/helpers/pagination: Remove generic parameter from is_useragent_or_ip_blocked() fn
1 parent 9094938 commit b0a06ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/controllers/helpers/pagination.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ impl RawSeekPayload {
317317
///
318318
/// A request can be blocked if either the User Agent is on the User Agent block list or if the client
319319
/// 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>();
320+
fn is_useragent_or_ip_blocked(config: &Server, req: &Parts) -> bool {
321+
let user_agent = req.headers.get_str_or_default(header::USER_AGENT);
322+
let client_ip = req.extensions.get::<RealIp>();
323323

324324
// check if user agent is blocked
325325
if config

0 commit comments

Comments
 (0)