Open lingsamuel opened 1 year ago
Hi, I'd like to work on this if possible. Adding a few questions as well to make sure my understanding is correct:
Since https://github.com/chaitin/lua-resty-t1k accepts the modes, do we want to just add it here: https://github.com/apache/apisix/blob/master/apisix/plugins/chaitin-waf.lua#L62 ? Should we change the output messages accordingly as well?
I am guessing we can use core.request.get_remote_client_ip
to get the client ip, but what would the config do? If set to disabled, should we just pass in a hardcoded ip like 127.0.0.1 in the config variable remote_addr?
This seems to be a simple one line addition of the lrucache module - we can probably start with TTL of 300 and size 1024?
I have opened https://github.com/apache/apisix/pull/11705 to add the cache. @lingsamuel @moonming Please review the PR and let me know if I'm on the right path. I'd love to work on the rest of the tasks in this issue as well once this is done. Maybe I can push it in the same PR. Please let me know!
There are some todos need to be done in chaitin-waf plugin.
traffic-split
plugin also need this)