mirror of
https://github.com/danog/code-server.git
synced 2024-11-27 04:45:52 +01:00
fix: update logic for removing token from limiter
This commit is contained in:
parent
958f01262b
commit
7a5042176e
@ -88,9 +88,7 @@ router.post("/", async (req, res) => {
|
|||||||
|
|
||||||
// Note: successful logins should not count against the RateLimiter
|
// Note: successful logins should not count against the RateLimiter
|
||||||
// which is why this logic must come after the successful login logic
|
// which is why this logic must come after the successful login logic
|
||||||
if (!limiter.removeToken()) {
|
limiter.removeToken()
|
||||||
throw new Error("Login rate limited!")
|
|
||||||
}
|
|
||||||
|
|
||||||
console.error(
|
console.error(
|
||||||
"Failed login attempt",
|
"Failed login attempt",
|
||||||
|
Loading…
Reference in New Issue
Block a user