Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,9 @@ async def create_auto_user_entry(
|
|
90 |
"""
|
91 |
try:
|
92 |
# Automatically extract the client's IP address
|
93 |
-
|
|
|
|
|
94 |
|
95 |
# If timestamp is not provided, use the current time
|
96 |
if not timestamp:
|
|
|
90 |
"""
|
91 |
try:
|
92 |
# Automatically extract the client's IP address
|
93 |
+
client_ip = request.client.host
|
94 |
+
if "x-forwarded-for" in request.headers:
|
95 |
+
client_ip = request.headers["x-forwarded-for"].split(",")[0]
|
96 |
|
97 |
# If timestamp is not provided, use the current time
|
98 |
if not timestamp:
|