diff --git a/src/api/bkuser_core/config/common/platform.py b/src/api/bkuser_core/config/common/platform.py index 9f4be33c4..89a0a6412 100644 --- a/src/api/bkuser_core/config/common/platform.py +++ b/src/api/bkuser_core/config/common/platform.py @@ -25,9 +25,10 @@ # ============================================================================== # 蓝鲸平台 URL BK_PAAS_URL = env("BK_PAAS_URL") +BK_PAAS_INNER_HOST = env("BK_PAAS_INNER_HOST", default=BK_PAAS_URL) # ESB Api URL -BK_COMPONENT_API_URL = env("BK_COMPONENT_API_URL", default=BK_PAAS_URL) +BK_COMPONENT_API_URL = env("BK_COMPONENT_API_URL", default=BK_PAAS_INNER_HOST) # ESB API 路径前缀 BK_PAAS_API_PATH_PREFIX = env("BK_PAAS_API_PATH_PREFIX", default="/component") diff --git a/src/build/saas/.env b/src/build/saas/.env index 772a776d4..813829c43 100644 --- a/src/build/saas/.env +++ b/src/build/saas/.env @@ -1,4 +1,5 @@ BK_PAAS_URL=$BK_PAAS_HOST +BK_PAAS_INNER_HOST=$BK_PAAS_INNER_HOST BK_LOGIN_API_URL=http://paas.service.consul:80/login BK_APP_CODE=$APP_ID diff --git a/src/saas/bkuser_shell/config/common/platform.py b/src/saas/bkuser_shell/config/common/platform.py index be7ae669c..ac3f650e6 100644 --- a/src/saas/bkuser_shell/config/common/platform.py +++ b/src/saas/bkuser_shell/config/common/platform.py @@ -22,6 +22,7 @@ # 蓝鲸智云开发者中心的域名,形如:http://paas.example.com BK_PAAS_URL = env("BK_PAAS_URL") +BK_PAAS_INNER_HOST = env("BK_PAAS_INNER_HOST", default=BK_PAAS_URL) # 蓝鲸登录跳转页面 BK_LOGIN_URL = env("BK_LOGIN_URL", default=f"{BK_PAAS_URL}/login/") @@ -29,7 +30,7 @@ BK_LOGIN_API_URL = env("BK_LOGIN_API_URL", default=f"{BK_PAAS_URL}/login") # ESB Api URL -BK_COMPONENT_API_URL = env("BK_COMPONENT_API_URL", default=BK_PAAS_URL) +BK_COMPONENT_API_URL = env("BK_COMPONENT_API_URL", default=BK_PAAS_INNER_HOST) # 请求官方 API 默认版本号,可选值为:"v2" 或 "";其中,"v2"表示规范化API,""表示未规范化API DEFAULT_BK_API_VER = "v2"