mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
Implement a ratelimit for Web App Form endpoints (vibe-kanban 033e0d0d)
Prevent adversaries from brute-frocing the form token.
This commit is contained in:
@ -117,6 +117,12 @@ class InvokeRateLimitError(BaseHTTPException):
|
||||
code = 429
|
||||
|
||||
|
||||
class WebFormRateLimitExceededError(BaseHTTPException):
|
||||
error_code = "web_form_rate_limit_exceeded"
|
||||
description = "Too many form requests. Please try again later."
|
||||
code = 429
|
||||
|
||||
|
||||
class NotFoundError(BaseHTTPException):
|
||||
error_code = "not_found"
|
||||
code = 404
|
||||
|
||||
Reference in New Issue
Block a user