Doorman
DocsGet StartedGitHub

© 2025 griffen.codes

DiscordIssuesGitHub
    Documentation

    Getting Started

    • Getting Started

    Configuration

    • Configuration
    • Templates
    • Examples

    Commands

    • Commands Overview

    Guides

    • CI/CD Integration
    • Cloudflare Setup
    • Cloudflare Migration
    View on GitHub Wiki
    Docs/Configuration/Templates
    Configuration

    Templates

    Pre-built rule templates for common security patterns like bot blocking and OFAC compliance.

    Edit on GitHub

    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.

    Using Templates

    bash
    # 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.

    Available Templates

    bad-bots — Block Malicious Bots

    Blocks common malicious bot user agents that are known to scrape, spam, or attack websites.

    bash
    npx vercel-doorman template bad-bots

    Blocks user agents matching patterns like:

    • Common scraping bots
    • Known spam bots
    • Vulnerability scanners
    • SEO spam crawlers

    ai-bots — Block AI Crawlers

    Blocks AI training crawlers and scrapers that may use your content without permission.

    bash
    npx vercel-doorman template ai-bots

    Blocks crawlers from:

    • GPTBot (OpenAI)
    • CCBot (Common Crawl)
    • Google-Extended
    • Anthropic crawlers
    • Other AI training bots

    wordpress — WordPress Protection

    Blocks requests targeting WordPress-specific paths. Useful for non-WordPress sites that receive WordPress-targeted attacks.

    bash
    npx vercel-doorman template wordpress

    Blocks paths like:

    • /wp-admin/
    • /wp-login.php
    • /wp-content/
    • /xmlrpc.php
    • Other common WordPress attack vectors

    block-ofac-sanctioned-countries — OFAC Compliance

    Blocks traffic from OFAC-sanctioned countries for regulatory compliance.

    bash
    npx vercel-doorman template block-ofac-sanctioned-countries

    Blocks traffic from countries under US Treasury OFAC sanctions.

    Customizing Templates

    After adding a template, you can customize the generated rules in your vercel-firewall.config.json:

    1. Modify conditions — Adjust matching criteria
    2. Change actions — Switch from deny to challenge or log
    3. Add exceptions — Create additional condition groups
    4. Disable rules — Set "active": false to temporarily disable

    Creating Custom Templates

    Templates are defined in the templates directory of the source code. Each template exports a set of rules following the standard rule format.

    Related Pages

    • Getting Started — Quick setup guide
    • Configuration — Configuration file reference
    • Examples — Real-world configuration examples
    • Commands Overview — CLI command reference

    This content is sourced from the GitHub Wiki.

    PreviousConfigurationNextExamples