You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@vercel/firewall

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
v

@vercel/firewall

Rate limiting via the Vercel Firewall

1.0.0
canary
latest
84

Supply Chain Security

100

Vulnerability

74

Quality

91

Maintenance

100

License

Version published
Weekly downloads
8.5K
104.78%
Maintainers
8
Weekly downloads
 
Created
Issues
275

@vercel/firewall

Programmatic rate limits

See our Firewall docs for detailed documentation of @vercel/firewall.

import { checkRateLimit } from '@vercel/firewall';

export async function POST() {
  const { rateLimited } = await checkRateLimit('my-rate-limit-id');
  if (rateLimited) {
    return new Response('', {
      status: 429,
    });
  }
  // Implement logic guarded by rate limit
}

Vercel

Develop. Preview. Ship.

FAQs

Package last updated on 27 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts