-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(plugin) bot-detection #1259
Conversation
a7905ac
to
93b4e60
Compare
Because the target is 0.9, this should be based of refactor/cli, since some of the changes made here are outdated, and because it removes dependencies such as stringy, for instance. |
I take it the other way around: I am waiting for |
Ok, it will mean rewriting all the tests too. |
cache.set(cache.bot_detection_key(key), value) | ||
local index_keys = cache.get(INDEX) | ||
if not index_keys then index_keys = {} end | ||
table.insert(index_keys, key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index_keys[#index_keys+1] = key
is the preferred way because faster and cleaner.
93b4e60
to
6a161a4
Compare
Needs to be reworked with new testing tools after |
replaced by #1413 |
This plugin detects popular bots from the
User-Agent
of the request and forbids them from executing the request.The generic rules hard-coded in the plugin can be overwritten with an array of Regex expressions in a
config.whitelist
orconfig.blacklist
property when adding the plugin.