-- counting how many requests a given ip did | |
local redis_client = redis_cluster:new(config) | |
local resp, err = redis_client:incr(ngx.var.remote_addr) | |
ngx.header['X-Request-Counter'] = resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment