adapt general request limits

This commit is contained in:
Joachim Lusiardi 2021-05-31 21:23:12 +02:00
parent 7797d6c91e
commit 4196111529
1 changed files with 2 additions and 1 deletions

View File

@ -15,10 +15,11 @@ from .forms import *
app = Flask(__name__) app = Flask(__name__)
app.config.from_object(config[os.getenv('FLASK_CONFIG') or 'default']) app.config.from_object(config[os.getenv('FLASK_CONFIG') or 'default'])
# applies to all routes, so choose limits wisely!
limiter = Limiter( limiter = Limiter(
app, app,
key_func=get_remote_address, key_func=get_remote_address,
default_limits=["200 per day", "50 per hour"] # default_limits=["500 per second"]
) )