File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: config:: Server ;
2
- use crate :: controllers:: util:: RequestPartsExt ;
3
2
use crate :: middleware:: app:: RequestApp ;
4
3
use crate :: middleware:: log_request:: RequestLogExt ;
5
4
use crate :: middleware:: real_ip:: RealIp ;
@@ -317,9 +316,9 @@ impl RawSeekPayload {
317
316
///
318
317
/// A request can be blocked if either the User Agent is on the User Agent block list or if the client
319
318
/// 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 > ( ) ;
319
+ fn is_useragent_or_ip_blocked ( config : & Server , req : & Parts ) -> bool {
320
+ let user_agent = req. headers . get_str_or_default ( header:: USER_AGENT ) ;
321
+ let client_ip = req. extensions . get :: < RealIp > ( ) ;
323
322
324
323
// check if user agent is blocked
325
324
if config
You can’t perform that action at this time.
0 commit comments