Merge pull request #7918 from silverstripe-terraformers/pulls/updated-docs

Updated docs for Rate Limiting.
This commit is contained in:
Daniel Hensby 2018-03-09 10:52:12 +00:00 committed by GitHub
commit da5e73c115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,15 @@ Director:
'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
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:
rules:
'Security//$Action/$ID/$OtherID': SilverStripe\Security\Security
```
```