-
Notifications
You must be signed in to change notification settings - Fork 1
Templates
Vercel Doorman includes pre-built rule templates for common security patterns. Templates save time by providing battle-tested configurations you can add with a single command.
# List all available templates
npx vercel-doorman template
# Add a specific template
npx vercel-doorman template <template-name>Templates are added to your existing configuration file. You can customize the rules after adding them.
Blocks common malicious bot user agents that are known to scrape, spam, or attack websites.
npx vercel-doorman template bad-botsBlocks user agents matching patterns like:
- Common scraping bots
- Known spam bots
- Vulnerability scanners
- SEO spam crawlers
Blocks AI training crawlers and scrapers that may use your content without permission.
npx vercel-doorman template ai-botsBlocks crawlers from:
- GPTBot (OpenAI)
- CCBot (Common Crawl)
- Google-Extended
- Anthropic crawlers
- Other AI training bots
Blocks requests targeting WordPress-specific paths. Useful for non-WordPress sites that receive WordPress-targeted attacks.
npx vercel-doorman template wordpressBlocks paths like:
/wp-admin//wp-login.php/wp-content//xmlrpc.php- Other common WordPress attack vectors
Blocks traffic from OFAC-sanctioned countries for regulatory compliance.
npx vercel-doorman template block-ofac-sanctioned-countriesBlocks traffic from countries under US Treasury OFAC sanctions.
After adding a template, you can customize the generated rules in your vercel-firewall.config.json:
- Modify conditions — Adjust matching criteria
-
Change actions — Switch from
denytochallengeorlog - Add exceptions — Create additional condition groups
-
Disable rules — Set
"active": falseto temporarily disable
Templates are defined in the templates directory of the source code. Each template exports a set of rules following the standard rule format.
- Getting Started — Quick setup guide
- Configuration — Configuration file reference
- Examples — Real-world configuration examples
- Commands Overview — CLI command reference
Getting Started
Configuration
Commands
Guides