fastify / fastify-rate-limit

A low overhead rate limiter for your routes
MIT License
504 stars 71 forks source link

tests: head routes get applied rate limiting hook only once #267

Closed Uzlopak closed 2 years ago

Uzlopak commented 2 years ago

There was a bug in fastify core, where an onRoute hook would be called twice on automatic generated HEAD routes. This was fixed in core. This PR fixes unit tests and adds one regarding the expected behaviour.

Checklist

Eomm commented 2 years ago

Can this pr go further now?

Uzlopak commented 2 years ago

@Eomm No. This PR is actually just about adding a unit test and patch a unit test. Once fastify 4.6.1 is released we can and must apply this PR. But as long 4.6.0 of fastify is highest version this PR has to wait.

Uzlopak commented 2 years ago

thanks