Devographics / Monorepo

Monorepo containing the State of JS apps
surveyform-sigma.vercel.app
Other
134 stars 52 forks source link

Ratelimit at middleware level #431

Closed eric-burel closed 1 month ago

eric-burel commented 1 month ago

This setups a rate limiter for post endpoints, at middleware level. The limit is 50 requests per 10 seconds as a default. For mail sending enpoint, it's 10 requests for 15 minutes, so a much stronger rate limitation. It doesn't affect a few non-sensitive endpoints like "saveResponse".

This might cost us more middleware invocations on Vercel, for API calls, but they are inexpensive and shouldn't be a problem

This would need some testing, perhaps something to deploy at the end of the state of html survey?

netlify[bot] commented 1 month ago

Deploy Preview for graphiql-devographics canceled.

Name Link
Latest commit e628b32426bfb2f32d578f0ca6dd6d402368e746
Latest deploy log https://app.netlify.com/sites/graphiql-devographics/deploys/66f418e560eca60008a9679b
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
results-astro ❌ Failed (Inspect) Sep 25, 2024 2:06pm