From 421cd08218e20f394df94813fb09b09af4b4108a Mon Sep 17 00:00:00 2001 From: Mauran Muthiah Date: Fri, 17 Nov 2017 12:42:06 +0100 Subject: [PATCH 1/2] Gatekeeper instead of GateKeeper --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8101e5d..e623efa 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ [![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) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/gatekeeper/master/LICENSE) -GateKeeper is a middleware that restricts the number of requests from clients, based on their IP address. -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 +Gatekeeper is a middleware that restricts the number of requests from clients, based on their IP address. +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 **Please take into consideration that multiple clients can be using the same IP address. eg. public wifi** @@ -44,7 +44,7 @@ import Gatekeeper public func setup() throws { // ... - addConfigurable(middleware: GateKeeper(rate: Rate(10, per: .minute)), name: "gatekeeper") + addConfigurable(middleware: Gatekeeper(rate: Rate(10, per: .minute)), name: "gatekeeper") } ``` From 87227d7fb7b5d1b97a9ed3c431e5d292e9e34a2d Mon Sep 17 00:00:00 2001 From: "Steffen D. Sommer" Date: Fri, 17 Nov 2017 12:51:17 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e623efa..ba88fcf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/gatekeeper/master/LICENSE) Gatekeeper is a middleware that restricts the number of requests from clients, based on their IP address. -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 +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 **Please take into consideration that multiple clients can be using the same IP address. eg. public wifi**