update
Browse files
app.py
CHANGED
|
@@ -178,6 +178,9 @@ def generate_image(main_image, background_image, did, request: gr.Request):
|
|
| 178 |
return gr.Warning(m), did
|
| 179 |
|
| 180 |
client_ip = request.client.host
|
|
|
|
|
|
|
|
|
|
| 181 |
|
| 182 |
timestamp = str(int(time.time()))
|
| 183 |
signature = generate_signature(
|
|
|
|
| 178 |
return gr.Warning(m), did
|
| 179 |
|
| 180 |
client_ip = request.client.host
|
| 181 |
+
x_forwarded_for = request.headers.get('x-forwarded-for')
|
| 182 |
+
if x_forwarded_for:
|
| 183 |
+
client_ip = x_forwarded_for
|
| 184 |
|
| 185 |
timestamp = str(int(time.time()))
|
| 186 |
signature = generate_signature(
|