Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
make login lockout duration configurable (#11699)
Kazuhisa Wadae20161b3def6
diff --git a/api/.env.example b/api/.env.exampleindex 74f83aa06c8..9602c6492d8 100644--- a/api/.env.example+++ b/api/.env.example@@ -435,3 +435,5 @@ CREATE_TIDB_SERVICE_JOB_ENABLED=false# Maximum number of submitted thread count in a ThreadPool for parallel node executionMAX_SUBMIT_COUNT=100+# Lockout duration in seconds+LOGIN_LOCKOUT_DURATION=86400\ No newline at end of filediff --git a/api/configs/feature/__init__.py b/api/configs/feature/__init__.pyindex e79401bdfda..dfcfa635d43 100644--- a/api/configs/feature/__init__.py+++ b/api/configs/feature/__init__.py@@ -485,6 +485,11 @@ class AuthConfig(BaseSettings):default=60,)+ LOGIN_LOCKOUT_DURATION: PositiveInt = Field(+ description="Time (in seconds) a user must wait before retrying login after exceeding the rate limit.",+ default=86400,+ )+class ModerationConfig(BaseSettings):"""diff --git a/api/services/account_service.py b/api/services/account_service.pyindex f0c6ac7ebd6..22b54a3ab87 100644--- a/api/services/account_service.py+++ b/api/services/account_service.py@@ -420,7 +420,7 @@ class AccountService:if count is None:count = 0count = int(count) + 1- redis_client.setex(key, 60 * 60 * 24, count)+ redis_client.setex(key, dify_config.LOGIN_LOCKOUT_DURATION, count)@staticmethoddef is_login_error_rate_limit(email: str) -> bool: