Skip to content

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

@mikz

Description

@mikz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions