From c0ba4d177f1a1323dbe57f53b7902d7230f2f06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20L=C3=B3pez=20Mareque?= Date: Tue, 19 Oct 2021 14:40:06 +0200 Subject: [PATCH] fix: sourceCriterion documentation for InFlightReq and RateLimit middlewares --- docs/content/middlewares/http/inflightreq.md | 2 +- docs/content/middlewares/http/ratelimit.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/middlewares/http/inflightreq.md b/docs/content/middlewares/http/inflightreq.md index 8095ccd15..f2f76a3cb 100644 --- a/docs/content/middlewares/http/inflightreq.md +++ b/docs/content/middlewares/http/inflightreq.md @@ -115,7 +115,7 @@ http: ### `sourceCriterion` The `sourceCriterion` option defines what criterion is used to group requests as originating from a common source. -The precedence order is `ipStrategy`, then `requestHeaderName`, then `requestHost`. +If several strategies are defined at the same time, an error will be raised. If none are set, the default is to use the `requestHost`. #### `sourceCriterion.ipStrategy` diff --git a/docs/content/middlewares/http/ratelimit.md b/docs/content/middlewares/http/ratelimit.md index 8c382de10..7c8a45906 100644 --- a/docs/content/middlewares/http/ratelimit.md +++ b/docs/content/middlewares/http/ratelimit.md @@ -250,7 +250,7 @@ http: ### `sourceCriterion` The `sourceCriterion` option defines what criterion is used to group requests as originating from a common source. -The precedence order is `ipStrategy`, then `requestHeaderName`, then `requestHost`. +If several strategies are defined at the same time, an error will be raised. If none are set, the default is to use the request's remote address field (as an `ipStrategy`). #### `sourceCriterion.ipStrategy`