Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 0199170

Browse files
authored
Merge pull request #12 from nodes-vapor/feature/describe-rate-limit
Gatekeeper instead of GateKeeper
2 parents a2f04b7 + 87227d7 commit 0199170

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/nodes-vapor/gatekeeper)](http://clayallsopp.github.io/readme-score?url=https://github.com/nodes-vapor/gatekeeper)
99
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/gatekeeper/master/LICENSE)
1010

11-
GateKeeper is a middleware that restricts the number of requests from clients, based on their IP address.
12-
It works by adding the clients IP address to the cache and count how many requests the clients can make during the GateKeepers defined lifespan and give back an HTTP 429(Too Many Requests) if the limit has been reached. The number of requests left will be reset when the defined timespan has been reached
11+
Gatekeeper is a middleware that restricts the number of requests from clients, based on their IP address.
12+
It works by adding the clients IP address to the cache and count how many requests the clients can make during the Gatekeeper's defined lifespan and give back an HTTP 429(Too Many Requests) if the limit has been reached. The number of requests left will be reset when the defined timespan has been reached
1313

1414
**Please take into consideration that multiple clients can be using the same IP address. eg. public wifi**
1515

@@ -44,7 +44,7 @@ import Gatekeeper
4444
public func setup() throws {
4545
// ...
4646

47-
addConfigurable(middleware: GateKeeper(rate: Rate(10, per: .minute)), name: "gatekeeper")
47+
addConfigurable(middleware: Gatekeeper(rate: Rate(10, per: .minute)), name: "gatekeeper")
4848
}
4949
```
5050

0 commit comments

Comments
 (0)