1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-26 12:15:26 +00:00

fix: update logic for removing token from limiter

This commit is contained in:
Joe Previte 2021-04-19 11:12:43 -07:00
parent 958f01262b
commit 7a5042176e
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24

View File

@ -88,9 +88,7 @@ router.post("/", async (req, res) => {
// Note: successful logins should not count against the RateLimiter
// which is why this logic must come after the successful login logic
if (!limiter.removeToken()) {
throw new Error("Login rate limited!")
}
limiter.removeToken()
console.error(
"Failed login attempt",