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

Rate limit policy: template the rate limiting key by liquid #713

Closed
mikz opened this issue May 15, 2018 · 0 comments
Closed

Rate limit policy: template the rate limiting key by liquid #713

mikz opened this issue May 15, 2018 · 0 comments
Milestone

Comments

@mikz
Copy link
Contributor

mikz commented May 15, 2018

Use Cases

Rate limit by a Client IP address by using {{ ngx.var.remote_addr }} for the rate limiting key. This value would get evaluated and replaced with real value in the rewrite phase.

Rate limit by a value of parsed JWT by using {{ jwt.sub }} (to rate limit End Users for example).

Details

Use liquid templating as in #708 and #711.

Concerns

Liquid library we use is not really written with LuaJIT in mind, so the code is not really JITable. We might need to optimize parts of it to get better performance.

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