From 6625828246580d439d09349e414a318a41ad0d40 Mon Sep 17 00:00:00 2001 From: GareArc Date: Sun, 8 Mar 2026 23:45:10 -0700 Subject: [PATCH] fix: exempt setup flow endpoints from license check Add /console/api/init and /console/api/login to the license exempt list so that fresh installs can complete setup when the enterprise license is inactive. Without these exemptions the init password validation and post-setup auto-login are blocked, causing the setup page to enter an infinite reload loop. --- api/app_factory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/app_factory.py b/api/app_factory.py index efefa7a455..65a1690c15 100644 --- a/api/app_factory.py +++ b/api/app_factory.py @@ -47,6 +47,8 @@ def create_flask_app_with_configs() -> DifyApp: # Console bootstrap APIs exempt from license check: # - system-features: license status for expiry UI (GlobalPublicStoreProvider) # - setup: install/setup status check (AppInitializer) + # - init: init password validation for fresh install (InitPasswordPopup) + # - login: auto-login after setup completion (InstallForm) # - features: billing/plan features (ProviderContextProvider) # - account/profile: login check + user profile (AppContextProvider, useIsLogin) # - workspaces/current: workspace + model providers (AppContextProvider) @@ -57,6 +59,8 @@ def create_flask_app_with_configs() -> DifyApp: console_exempt_prefixes = ( "/console/api/system-features", "/console/api/setup", + "/console/api/init", + "/console/api/login", "/console/api/features", "/console/api/account/profile", "/console/api/workspaces/current",