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 11use  crate :: config:: Server ; 
2- use  crate :: controllers:: util:: RequestPartsExt ; 
32use  crate :: middleware:: app:: RequestApp ; 
43use  crate :: middleware:: log_request:: RequestLogExt ; 
54use  crate :: middleware:: real_ip:: RealIp ; 
@@ -317,9 +316,9 @@ impl RawSeekPayload {
317316/// 
318317/// A request can be blocked if either the User Agent is on the User Agent block list or if the client 
319318/// 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 > ( ) ; 
323322
324323    // check if user agent is blocked 
325324    if  config
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments