Use moving window strategy for limiter

This commit is contained in:
Piero Toffanin 2024-07-16 15:33:51 -04:00
parent 7b75dad479
commit 8e85c04558

View file

@ -239,7 +239,7 @@ def create_app(args):
storage_uri=args.req_limit_storage, storage_uri=args.req_limit_storage,
default_limits_deduct_when=lambda req: True, # Force cost to be called after the request default_limits_deduct_when=lambda req: True, # Force cost to be called after the request
default_limits_cost=limits_cost, default_limits_cost=limits_cost,
strategy="fixed-window-elastic-expiry", strategy="moving-window",
) )
else: else:
from .no_limiter import Limiter from .no_limiter import Limiter