We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3980c33 commit 33024a8Copy full SHA for 33024a8
1 file changed
infrastructure/evault-core/src/index.ts
@@ -186,7 +186,11 @@ const initializeEVault = async (
186
const ip = request.ip;
187
const { allowed, retryAfterSeconds } = checkGlobalRateLimit(token, ip);
188
if (!allowed) {
189
- reply
+ // In an async onRequest hook, Fastify only short-circuits the
190
+ // handler chain if you return the reply object. Without the
191
+ // return, the 429 is queued but the downstream handler (GraphQL)
192
+ // still runs — turning the rate limiter into a silent counter.
193
+ return reply
194
.code(429)
195
.header("Retry-After", String(retryAfterSeconds))
196
.send({
0 commit comments