File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed 
stac_fastapi/api/stac_fastapi/api Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ def _get_forwarded_url_parts(self, scope: Scope) -> Tuple[str]:
9494            for  proxy  in  forwarded .split ("," ):
9595                if  (proto_expr  :=  re .search (r"proto=(?P<proto>http(s)?)" , proxy )) and  (
9696                    host_expr  :=  re .search (
97-                         r"host=(?P<host>[\w.-]+)(:(?P<port>\w+ ))?" , proxy 
97+                         r"host=(?P<host>[\w.-]+)(:(?P<port>\d{1,5} ))?" , proxy 
9898                    )
9999                ):
100100                    proto  =  proto_expr .groupdict ()["proto" ]
@@ -107,7 +107,7 @@ def _get_forwarded_url_parts(self, scope: Scope) -> Tuple[str]:
107107            port_str  =  self ._get_header_value_by_name (scope , "x-forwarded-port" , port )
108108
109109        try :
110-             port  =  int (port_str ) if  port_str  is  not None  else  None 
110+             port  =  int (port_str ) if  port_str  is  not None  else  port 
111111        except  ValueError :
112112            # ignore ports that are not valid integers 
113113            pass 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments