Skip to content

Commit

Permalink
controllers/helpers/pagination: Remove generic parameter from `is_use…
Browse files Browse the repository at this point in the history
…ragent_or_ip_blocked()` fn
  • Loading branch information
Turbo87 committed Dec 12, 2024
1 parent 9094938 commit b0a06ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controllers/helpers/pagination.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ impl RawSeekPayload {
///
/// A request can be blocked if either the User Agent is on the User Agent block list or if the client
/// IP is on the CIDR block list.
fn is_useragent_or_ip_blocked<T: RequestPartsExt>(config: &Server, req: &T) -> bool {
let user_agent = req.headers().get_str_or_default(header::USER_AGENT);
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>();

// check if user agent is blocked
if config
Expand Down

0 comments on commit b0a06ae

Please sign in to comment.