Skip to content

Commit c39447a

Browse files
Nyholmjaviereguiluz
authored andcommitted
[RateLimiter] Adding config reference for policy and lock_factory
1 parent 064bb18 commit c39447a

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`_
@@ -1220,6 +1227,35 @@ dsn
12201227

12211228
The DSN where to store the profiling information.
12221229

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy