diff --git a/flask_appbuilder/security/manager.py b/flask_appbuilder/security/manager.py index 82423cfa4c..d046eec9f0 100644 --- a/flask_appbuilder/security/manager.py +++ b/flask_appbuilder/security/manager.py @@ -304,7 +304,9 @@ def __init__(self, appbuilder): self.limiter = self.create_limiter(app) def create_limiter(self, app: Flask) -> Limiter: - limiter = Limiter(key_func=get_remote_address) + limiter = Limiter( + key_func=app.config.get("RATELIMIT_KEY_FUNC", get_remote_address) + ) limiter.init_app(app) return limiter diff --git a/requirements/base.txt b/requirements/base.txt index a7cd7822e9..3821e562cd 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -22,7 +22,7 @@ colorama==0.4.6 # via flask-appbuilder deprecated==1.2.14 # via limits -dnspython==2.4.2 +dnspython==2.6.1 # via email-validator email-validator==1.3.1 # via flask-appbuilder