Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -83,6 +83,10 @@ ip_requests = {}
|
|
83 |
ip_requests_lock = threading.Lock()
|
84 |
|
85 |
def allow_ip(request: gr.Request, show_error=True):
|
|
|
|
|
|
|
|
|
86 |
ip = request.client.host
|
87 |
now = datetime.now()
|
88 |
window = timedelta(hours=24)
|
|
|
83 |
ip_requests_lock = threading.Lock()
|
84 |
|
85 |
def allow_ip(request: gr.Request, show_error=True):
|
86 |
+
print(request)
|
87 |
+
print(request.client)
|
88 |
+
print(request.headers)
|
89 |
+
print(request.headers.get("X-Forwarded-For"), request.headers.get("X-Real-IP"))
|
90 |
ip = request.client.host
|
91 |
now = datetime.now()
|
92 |
window = timedelta(hours=24)
|