Skip to content

Configuration Reference (v0.1.x) ​

Legacy Version Notice

You are currently viewing the documentation for the v0.1.x series.
For the newest features (such as allowedIps CIDR/IP whitelisting), visit Latest Configuration.

Options in v0.1.x ​

KeyTypeDefaultDescription
enabledbooltrueEnables or disables the middleware.
enableDefaultPatternsbooltrueEnables built-in sensitive file blocking.
pathPatterns[]string[]List of custom regular expressions to block.
blockPatterns[]string[]Alias for pathPatterns.
allowPatterns[]string(Safe defaults)List of regex patterns to explicitly allow.
checkQueryboolfalseAlso inspects raw query strings.
statusCodeint403HTTP status code when request is blocked.
responseobject{}Configures custom response modes (json, html, captcha, redirect, text).

Released under the MIT License.