I need a nginx configuration that implements rate limiting based on a claim inside a jwt token.
1 - If an http request has an Authorization header:
a) decode (not verify) the value of the header as a JWT token
b) extract the "sub" claim
c) apply a rate limit of 1 request per second to all requests with the same "sub" claim
2 - If an http request does not have an Authorization header
a) apply a rate limit of 5 requests per second to the same IP
Hello, I can setup Nginx rate limiting per jwt. Please let me know if you are interested so we can discuss the project further. Waiting for your reply. Thank you