0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

Add the rate_limited/2 REST callback

This commit is contained in:
Loïc Hoguin 2018-11-04 11:51:35 +01:00
parent bf7ccc8623
commit 8c9ad7bf07
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
8 changed files with 597 additions and 190 deletions

View file

@ -122,6 +122,9 @@ Can access to a resource be forbidden regardless of access
being authorized? A simple example of that is censorship
of a resource. Implement the `forbidden` callback.
Can access be rate-limited for authenticated users? Use the
`rate_limited` callback.
Are there any constraints on the length of the resource URI?
For example, the URI may be used as a key in storage and may
have a limit in length. Implement `uri_too_long`.

View file

@ -84,6 +84,7 @@ if it is undefined, moving directly to the next step. Similarly,
| multiple_choices | `false`
| options | `ok`
| previously_existed | `false`
| rate_limited | `false`
| resource_exists | `true`
| service_available | `true`
| uri_too_long | `false`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Before After
Before After

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Before After
Before After