Adds key-resolver example to requestratelimiter-factory.adoc
Fixes gh-2733 Co-authored-by: Archimedes Trajano <developer@trajano.net>
This commit is contained in:
@@ -32,10 +32,28 @@ You can adjust this behavior by setting the `spring.cloud.gateway.filter.request
|
||||
The `RequestRateLimiter` is not configurable with the "shortcut" notation. The following example below is _invalid_:
|
||||
|
||||
.application.properties
|
||||
[source,properties]
|
||||
----
|
||||
# INVALID SHORTCUT CONFIGURATION
|
||||
spring.cloud.gateway.routes[0].filters[0]=RequestRateLimiter=2, 2, #{@userkeyresolver}
|
||||
----
|
||||
|
||||
Here is a valid yaml reference:
|
||||
|
||||
.application.yml
|
||||
[source,yaml]
|
||||
----
|
||||
spring:
|
||||
cloud:
|
||||
gateway:
|
||||
routes:
|
||||
- id: limit
|
||||
uri: https://example.org
|
||||
filters:
|
||||
- name: RequestRateLimiter
|
||||
args:
|
||||
key-resolver: "#{@userkeyresolver}"
|
||||
----
|
||||
=====
|
||||
|
||||
[[redis-ratelimiter]]
|
||||
|
||||
Reference in New Issue
Block a user