Welcome! Log In Create A New Profile

Advanced

API ratelimiting, setting extra headers X-RateLimit-Limit X-RateLimit-Remaining X-RateLimit-Reset

March 25, 2015 11:09AM
I am searching for API ratelimiting and can't find anything...

Is it possible to handle all of this in nginx? ( Seting/evaluating headers, limiting connection, IP whitelisting ) ?

I want to throttle access to our API and send extra headers, based on the limit say 100 req / minute for 1 IP you would get a 429 HTTP error code ( Too many requests ) and extra header X-RateLimit-Reset: would state how much time left until limit will expire.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 56
X-RateLimit-Reset: 54

Like github does and documents it:
https://developer.github.com/v3/rate_limit/
Subject Author Posted

API ratelimiting, setting extra headers X-RateLimit-Limit X-RateLimit-Remaining X-RateLimit-Reset

asarnoldas March 25, 2015 11:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 50
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready