Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -86,11 +86,6 @@ def allow_ip(request: gr.Request, show_error=True): 
     | 
|
| 86 | 
         
             
                ip = request.headers.get("X-Forwarded-For")
         
     | 
| 87 | 
         
             
                now = datetime.now()
         
     | 
| 88 | 
         
             
                window = timedelta(hours=24)
         
     | 
| 89 | 
         
            -
             
     | 
| 90 | 
         
            -
                ip = request.client.host
         
     | 
| 91 | 
         
            -
                now = datetime.now()
         
     | 
| 92 | 
         
            -
                window = timedelta(hours=24)
         
     | 
| 93 | 
         
            -
             
     | 
| 94 | 
         
             
                with ip_requests_lock:
         
     | 
| 95 | 
         
             
                    if ip in ip_requests:
         
     | 
| 96 | 
         
             
                        ip_requests[ip] = [timestamp for timestamp in ip_requests[ip] if now - timestamp < window]
         
     | 
| 
         | 
|
| 86 | 
         
             
                ip = request.headers.get("X-Forwarded-For")
         
     | 
| 87 | 
         
             
                now = datetime.now()
         
     | 
| 88 | 
         
             
                window = timedelta(hours=24)
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 89 | 
         
             
                with ip_requests_lock:
         
     | 
| 90 | 
         
             
                    if ip in ip_requests:
         
     | 
| 91 | 
         
             
                        ip_requests[ip] = [timestamp for timestamp in ip_requests[ip] if now - timestamp < window]
         
     |