Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

[FEATURE] Rate limit using middleware #9567

Open
@eddiejaoude

Description

@eddiejaoude

Is this a unique feature?

  • I have checked "open" AND "closed" issues and this is not a duplicate

Is your feature request related to a problem/unavailable functionality? Please describe.

After recent incidents of people trying to game the system to increase their profile views and stats, we should add a rate limit to protect our application

Vercel has a great example https://github.com/vercel/next.js/tree/canary/examples/api-routes-rate-limit using the library https://www.npmjs.com/package/lru-cache

A more complete solution (still official) but uses a 3rd party Upstash for Redis https://github.com/vercel/examples/tree/main/edge-functions/api-rate-limit-and-tokens

Proposed Solution

Middleware to rate limit requests per hour (for example 500 requests per hour)

Screenshots

No response

Do you want to work on this issue?

No

If you want to work on this issue...

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions