mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Updated docs for Rate Limiting.
This commit is contained in:
parent
ef63e42e35
commit
fdbf4c2134
@ -44,6 +44,15 @@ Director:
|
|||||||
'MyController//$Action/$ID/$OtherID': '%$MyRateLimitedController'
|
'MyController//$Action/$ID/$OtherID': '%$MyRateLimitedController'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or if you want to apply your middleware to a specific route:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
SilverStripe\Control\Director:
|
||||||
|
rules:
|
||||||
|
special/section:
|
||||||
|
Controller: %$MyRateLimitedController
|
||||||
|
```
|
||||||
|
|
||||||
## Applying rate limiting across an entire application
|
## Applying rate limiting across an entire application
|
||||||
|
|
||||||
If you'd like to add rate limiting to an entire application (ie: across all routes) then you'll need to define your rate
|
If you'd like to add rate limiting to an entire application (ie: across all routes) then you'll need to define your rate
|
||||||
@ -69,4 +78,4 @@ Add the following to your config.yml:
|
|||||||
SilverStripe\Control\Director:
|
SilverStripe\Control\Director:
|
||||||
rules:
|
rules:
|
||||||
'Security//$Action/$ID/$OtherID': SilverStripe\Security\Security
|
'Security//$Action/$ID/$OtherID': SilverStripe\Security\Security
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user