Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support RateLimit draft #81

Open
ioggstream opened this issue Jun 2, 2020 · 0 comments
Open

Support RateLimit draft #81

ioggstream opened this issue Jun 2, 2020 · 0 comments

Comments

@ioggstream
Copy link

ioggstream commented Jun 2, 2020

I wish

Sphinx to support this RateLimit Draft proposal (eg. via a configuration parameter):

The proposal has been already implemented by Kong and RedHat 3Scale API Gateway.

Differences respect to the current implementation

The current implementation returns X-RateLimit-Reset with a unix timestamp.
This approach is not aligned with the Retry-After http header and is subject to clock skew from clients.

To fix it, we should just change the following line - eg. via a configuration parameter -

headers["X-Ratelimit-Reset"] = append(headers["X-Ratelimit-Reset"], int64ToString(status.Reset.Unix()))
subtracting the current date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant