Skip to content

Commit

Permalink
fix: run a return and not done for the decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarneo committed Jan 29, 2024
1 parent 7056d1f commit e395fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/plugins/rate-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default fp((fastify, options = {}, done) => {

fastify.decorate('rateLimit', async (req, res) => {
if (!req.url.startsWith(settings.prefix)) {
done();
return;
}

const ip = getClientIp(req.headers);
Expand Down

0 comments on commit e395fd4

Please sign in to comment.