fastify / fastify-rate-limit

A low overhead rate limiter for your routes
MIT License
497 stars 70 forks source link

Don't set the reply code automatically #285

Closed gurgunday closed 1 year ago

gurgunday commented 1 year ago

Closes #284

Checklist

gurgunday commented 1 year ago

~I don't get why some tests fail~

See below

gurgunday commented 1 year ago

Ok, I had done something not smart, reverted that now. Should be good to go.

bcomnes commented 1 year ago

I have sensible and rate limit both set. Do I need to change anything to update to to v8?

gurgunday commented 1 year ago

I have sensible and rate limit both set. Do I need to change anything to update to to v8?

I have a similar setup and upgrading to v8 required no changes. If you have routes with a custom error handler where you don't set a reply code or don't use something like reply.redirect(), you might need to set the reply code yourself. For other routes, the error response should be identical to v7.

bcomnes commented 1 year ago

I see, thank you!