- Home
- Application Security
- API Security
- @fastify/rate-limit

@fastify/rate-limit
A low overhead rate limiter for your routes
@fastify/rate-limit Description
A low overhead rate limiter for your routes. This plugin will add an onRequest hook to check if a client (based on their IP address) has made too many requests in the given timeWindow. Usage: Register the plugin and, if required, pass some custom options. Example: ```javascript import Fastify from 'fastify' const fastify = Fastify() await fastify.register(import('@fastify/rate-limit'), { max: 100, timeWindow: '1 minute' }) fastify.get('/', (request, reply) => { reply.send({ hello: 'world' }) }) fastify.listen({ port: 3000 }, err => { if (err) throw err console.log('Server listening at http://localhost:3000') }) ```
FEATURED
Password manager with end-to-end encryption and identity protection features
VPN service providing encrypted internet connections and privacy protection
Fractional CISO services for B2B companies to accelerate sales and compliance
Stay Updated with Mandos Brief
Get the latest cybersecurity updates in your inbox
TRENDING CATEGORIES
POPULAR
Security platform that provides protection, monitoring and governance for enterprise generative AI applications and LLMs against various threats including prompt injection and data poisoning.
A threat intelligence aggregation service that consolidates and summarizes security updates from multiple sources to provide comprehensive cybersecurity situational awareness.
Fabric Platform is a cybersecurity reporting solution that automates and standardizes report generation, offering a private-cloud platform, open-source tools, and community-supported templates.
A weekly newsletter providing cybersecurity leadership insights, industry updates, and strategic guidance for security professionals advancing to management positions.