Update Throttler docs [ci skip]

This commit is contained in:
michalsn 2021-07-04 10:38:37 +02:00 committed by John Paul E. Balandan, CPA
parent 61c01ed40b
commit 906daf8a1d

View File

@ -75,10 +75,9 @@ along the lines of::
{
$throttler = Services::throttler();
// Restrict an IP address to no more
// than 1 request per second across the
// entire site.
if ($throttler->check($request->getIPAddress(), 60, MINUTE) === false) {
// Restrict an IP address to no more than 1 request
// per second across the entire site.
if ($throttler->check(md5($request->getIPAddress()), 60, MINUTE) === false) {
return Services::response()->setStatusCode(429);
}
}