Skip to content

Commit 8b8a1b9

Browse files
committed
minor #14746 [RateLimiter] Adding config reference for policy and lock_factory (Nyholm)
This PR was squashed before being merged into the 5.2 branch. Discussion ---------- [RateLimiter] Adding config reference for policy and lock_factory Just adding some config reference that are missing Commits ------- c39447a [RateLimiter] Adding config reference for policy and lock_factory
2 parents 682d549 + c39447a commit 8b8a1b9

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

rate_limiter.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Symfony uses these rate limiters in built-in features like "login throttling",
1616
which limits how many failed login attempts a user can make in a given period of
1717
time, but you can use them for your own features too.
1818

19+
.. _rate-limiter-policies:
20+
1921
Rate Limiting Policies
2022
----------------------
2123

reference/configuration/framework.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ Configuration
211211

212212
* :ref:`enabled <reference-property-info-enabled>`
213213

214+
* `rate_limiter`_:
215+
216+
* :ref:`name <reference-rate-limiter-name>`
217+
218+
* `lock_factory`_
219+
* `policy`_
220+
214221
* `request`_:
215222

216223
* `formats`_
@@ -1226,6 +1233,35 @@ dsn
12261233

12271234
The DSN where to store the profiling information.
12281235

1236+
rate_limiter
1237+
~~~~~~~~~~~~
1238+
1239+
.. _reference-rate-limiter-name:
1240+
1241+
name
1242+
....
1243+
1244+
**type**: ``prototype``
1245+
1246+
Name of the rate limiter you want to create.
1247+
1248+
lock_factory
1249+
""""""""""""
1250+
1251+
**type**: ``string`` **default:** ``lock.factory``
1252+
1253+
The service that is used to create a lock. The service has to implement the
1254+
:class:`Symfony\\Component\\Lock\\LockFactoryInterface`.
1255+
1256+
policy
1257+
""""""
1258+
1259+
**type**: ``string`` **required**
1260+
1261+
The name of the rate limiting algorithm to use. Example names are ``fixed_window``,
1262+
``sliding_window`` and ``no_limit``. See :ref:`Rate Limiter Policies <rate-limiter-policies>`)
1263+
for more information.
1264+
12291265
request
12301266
~~~~~~~
12311267

0 commit comments

Comments
 (0)