summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/middlewares/RateLimit.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/middlewares/RateLimit.ts b/api/src/middlewares/RateLimit.ts
index b4f32131..f31aa5da 100644
--- a/api/src/middlewares/RateLimit.ts
+++ b/api/src/middlewares/RateLimit.ts
@@ -71,7 +71,7 @@ export default function rateLimit(opts: {
 			if (offender.blocked) {
 				const global = bucket_id === "global";
 				reset = reset + opts.window * 1000; // each block violation pushes the expiry one full window further
-				offender.expires_at += opts.window * 1000;
+				offender.expires_at = offender.expires_at + opts.window * 1000;
 				resetAfterMs = reset - Date.now();
 				resetAfterSec = Math.ceil(resetAfterMs / 1000);