Skip to main content

Write Your Own Plugin

BlackLab WAF allows you to create custom plugins to detect specific attack patterns or application-specific threats. You can define your own rules, assign weights, and decide what happens when a request exceeds your threshold.

Example

A custom plugin could, for instance, block requests containing certain headers or patterns unique to your app.
The plugin would be added to your configuration like any built-in plugin:
BlackLab.configure do |config|
  config.plugins = [
    MyCustomPlugin.new(weight: 2)
  ]
end