💚 Add wrapper around limit decorator to fix pytest discovery
This commit is contained in:
1 parent
3e3c11811e
commit
6af0ce48dc
2 files changed
+20
-1
No files matched your search
@@ -35,6 +35,7 @@ from octoprint.server.util import (
|
||||
from octoprint.server.util.flask import (
|
||||
get_json_command_from_request,
|
||||
get_remote_address,
|
||||
limit,
|
||||
no_firstrun_access,
|
||||
passive_login,
|
||||
)
|
||||
@@ -281,7 +282,7 @@ def serverStatus():
|
||||
|
||||
|
||||
@api.route("/login", methods=["POST"])
|
||||
@octoprint.server.limiter.limit(
|
||||
@limit(
|
||||
"3/minute;5/10 minutes;10/hour",
|
||||
deduct_when=lambda response: response.status_code == 403,
|
||||
error_message="You have made too many failed login attempts. Please try again later.",
|
||||
|
||||
Reference in new issue
Block a user