'response-headers' = 'STANDARD' behaves like NONE
vasilaio opened this issue · comments
Ion Vasilachi commented
The 'response-headers' = 'STANDARD' is ignored by RateLimitPreFilter.
This issue was introduced in 10d2a51
To Reproduce
Steps to reproduce the behavior:
- Set 'response-headers' = 'STANDARD' in application.yml
- Make a request to cause 429 TO MANY REQUEST
- 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())) {