rate-limit
Basic Usage
Learn how to use the @perseidesjs/medusa-plugin-rate-limit
plugin in your Medusa app
How to use
If you want to start restricting certain routes, you can import the defaultRateLimit
middleware from the plugin and then use it as follows:
src/api/middlewares.ts
You can also pass some custom options to have a complete control over the rate limiting mechanism as follows:
src/api/middlewares.ts
In this example, the rate limiting mechanism will allow 10 requests per minute per IP address.
To learn more about advanced customization and configuration, check out the Customization section.