Deny bots based on custom regex

Block bots in the User_Agent header that match the custom regex you configure. User_Agent headers in requests that match are blocked with a 403 error.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: bot-detection
    config:
      deny:
      - "[^a-zA-Z0-9]"
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!