npm.io
1.1.0 • Published 2d ago

@bottoll/vercel

Licence
MIT
Version
1.1.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0

@bottoll/vercel

Official Bottoll WAF middleware for Vercel.

Bottoll protects Vercel applications against AI crawlers, AI agents, scrapers, and automated bot traffic before requests reach your application.

Vercel Only

This package is designed exclusively for Vercel deployments.

Supported environments:

  • Next.js deployed on Vercel
  • Vercel Edge Middleware

Other hosting providers are not currently supported.

Prerequisites

A Bottoll account is required.

Create an account and generate an API key from:

https://app.bottoll.com

If no valid API key is configured, Bottoll filtering is automatically disabled and requests continue normally.

Installation

npm install @bottoll/vercel

Configuration

Create a middleware.js or middleware.ts file at the root of your project.

import { bottoll } from "@bottoll/vercel";

export default bottoll({
  apiKey: process.env.BOTTOLL_API_KEY
});

export const config = {
  matcher: "/:path*"
};

Add your API key to your environment variables:

BOTTOLL_API_KEY=your_api_key

Deploy your application to Vercel.

How It Works

For every incoming request:

  1. The Vercel middleware intercepts the request.
  2. Request metadata is sent to Bottoll.
  3. Bottoll analyzes the request using its WAF engine.
  4. Bottoll returns an allow or block decision.
  5. Allowed requests continue normally.
  6. Blocked requests receive a 403 Forbidden response.

Request Data

Bottoll processes only the metadata required for request evaluation and bot detection.

This may include:

  • IP address
  • User-Agent
  • Request path
  • Request method
  • Standard HTTP headers

The following sensitive headers are automatically excluded before transmission:

  • Authorization
  • Cookie
  • Set-Cookie
  • Proxy-Authorization
  • X-CSRF-Token
  • X-XSRF-Token

Fail-Open Behavior

If Bottoll is temporarily unavailable or an unexpected error occurs, requests are allowed to continue.

This prevents Bottoll from causing downtime for your application.

Response Codes

200

The request is allowed.

403

The request is blocked by Bottoll.

Requirements

  • Vercel
  • Node.js 18 or later

Documentation

https://bottoll.com/docs

Website

https://bottoll.com

License

MIT

Keywords