Rate Limiter Response Headers

Hi,

I have rate limits setup and working well with Redis. However, wondering if there is any way to setup some response headers in case of a 429 in order to give the client more info to properly implement a backoff mechanism. For example:

#=============================#=============================================#
# HTTP Header                 # Description                                 #
#=============================#=============================================#
| X-RateLimit-Limit           | Request limit per day / per 5 minutes       |
+-----------------------------+---------------------------------------------+
| X-RateLimit-Remaining       | The number of requests left for the time    |
|                             | window                                      |
+-----------------------------+---------------------------------------------+
| X-RateLimit-Reset           | The remaining window before the rate limit  |
|                             | resets in UTC epoch seconds                 |
+-----------------------------+---------------------------------------------+

thanks

1 Like