marcosbarbero / spring-cloud-zuul-ratelimit

Rate limit auto-configure for Spring Cloud Netflix Zuul

Home Page:https://blog.marcosbarbero.com/spring-cloud-netflix-zuul-rate-limit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'response-headers' = 'STANDARD' behaves like NONE

vasilaio opened this issue · comments

The 'response-headers' = 'STANDARD' is ignored by RateLimitPreFilter.

This issue was introduced in 10d2a51

To Reproduce
Steps to reproduce the behavior:

  1. Set 'response-headers' = 'STANDARD' in application.yml
  2. Make a request to cause 429 TO MANY REQUEST
  3. Check response headers

Expected behavior
Response headers should be returned and should contain only standard values (#282)

Actual behavior
Response headers are missing (behaves like 'response-headers' = 'NONE')

Environment & Versioning (please complete the following information):

  • Spring Boot Version: 2.3.3.RELEASE
  • Spring Cloud Version: Hoxton.SR7
  • Spring Cloud Rate Limit Version: 2.4.1.RELEASE

Solution
Change the if statement to if (!NONE.equals(properties.getResponseHeaders())) {