Spaces:
Runtime error
Runtime error
xyplon
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,11 @@ import requests
|
|
9 |
app = Flask(__name__)
|
10 |
CORS(app)
|
11 |
|
|
|
|
|
|
|
12 |
limiter = Limiter(
|
13 |
-
key_func=
|
14 |
app=app,
|
15 |
default_limits=["8 per minute"]
|
16 |
)
|
|
|
9 |
app = Flask(__name__)
|
10 |
CORS(app)
|
11 |
|
12 |
+
def get_client_ip():
|
13 |
+
return request.headers.get(os.getenv('head'), get_remote_address())
|
14 |
+
|
15 |
limiter = Limiter(
|
16 |
+
key_func=get_client_ip,
|
17 |
app=app,
|
18 |
default_limits=["8 per minute"]
|
19 |
)
|