@bottoll/vercel
@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:
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:
- The Vercel middleware intercepts the request.
- Request metadata is sent to Bottoll.
- Bottoll analyzes the request using its WAF engine.
- Bottoll returns an allow or block decision.
- Allowed requests continue normally.
- Blocked requests receive a
403 Forbiddenresponse.
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
Website
License
MIT