Skip to content

Need a Flask configuration mechanism to disable rate limiter #192

@csw

Description

@csw

The rate limiting is hard-coded to e.g. 2 requests/second for the /variantvalidator/ endpoint, which is not suitable for my workload (against an internal instance!). It can be disabled dynamically through Flask's configuration mechanism with Flask-Limiter's RATELIMIT_ENABLED setting, but as far as I can tell, the application doesn't provide a way to set Flask settings without code changes. Enabling Flask's environment variable configuration mechanism will allow the rate limiter to be disabled by simply setting FLASK_RATELIMIT_ENABLED=. This could also be done via a configuration file, but being able to use environment variables as well is more convenient for containerized deployment.

I've tested this out, and I have the necessary change on my flask-env-vars branch. Please let me know if you'd rather approach this differently; I'll be happy to make changes or open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions