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.
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.