From c39447ab9ddd33dcd0a68b43eb65f70d23188f17 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Sun, 27 Dec 2020 11:30:56 +0100 Subject: [PATCH] [RateLimiter] Adding config reference for policy and lock_factory --- rate_limiter.rst | 2 ++ reference/configuration/framework.rst | 36 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/rate_limiter.rst b/rate_limiter.rst index 403aa9c462f..63e073a1e92 100644 --- a/rate_limiter.rst +++ b/rate_limiter.rst @@ -16,6 +16,8 @@ Symfony uses these rate limiters in built-in features like "login throttling", which limits how many failed login attempts a user can make in a given period of time, but you can use them for your own features too. +.. _rate-limiter-policies: + Rate Limiting Policies ---------------------- diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 4bc44ad1f17..cc00ae83c6f 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -211,6 +211,13 @@ Configuration * :ref:`enabled ` +* `rate_limiter`_: + + * :ref:`name ` + + * `lock_factory`_ + * `policy`_ + * `request`_: * `formats`_ @@ -1220,6 +1227,35 @@ dsn The DSN where to store the profiling information. +rate_limiter +~~~~~~~~~~~~ + +.. _reference-rate-limiter-name: + +name +.... + +**type**: ``prototype`` + +Name of the rate limiter you want to create. + +lock_factory +"""""""""""" + +**type**: ``string`` **default:** ``lock.factory`` + +The service that is used to create a lock. The service has to implement the +:class:`Symfony\\Component\\Lock\\LockFactoryInterface`. + +policy +"""""" + +**type**: ``string`` **required** + +The name of the rate limiting algorithm to use. Example names are ``fixed_window``, +``sliding_window`` and ``no_limit``. See :ref:`Rate Limiter Policies `) +for more information. + request ~~~~~~~