rate-limit
Getting Started
Learn how to use the @perseidesjs/medusa-plugin-rate-limit
plugin in your Medusa app
Getting Started
This utility middleware was mainly built to protect your MedusaJS application from abuse. It allows you to easily manage request limits without stepping outside the familiar Medusa environment.
Why Rate Limiting Matters
- Shield Against Attacks: Prevent Denial of Service (DoS) attempts by capping the number of requests from a single source.
- Boost Security: Thwart brute force attacks and other automated threats by controlling request frequency.
- Easy Setup: Seamlessly integrate rate limiting into your existing Medusa configuration files.
Installation
To get started, install the plugin using your preferred package manager:
Usage
This middleware uses the CacheModule available (InMemory, Redis, etc.) under the hood and exposes a simple middleware to limit the number of requests per IP address.
To learn how to apply rate limiting to your routes, head over to the Basic Usage section.