Skip to content

Commit

Permalink
Adds key-resolver example to requestratelimiter-factory.adoc
Browse files Browse the repository at this point in the history
Fixes gh-2733

Co-authored-by: Archimedes Trajano <[email protected]>
  • Loading branch information
spencergibb and trajano committed Mar 8, 2024
1 parent f6182df commit 688391a
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down

0 comments on commit 688391a

Please sign in to comment.