Skip to content

Commit

Permalink
feat: support paas_inner_host env
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 committed Sep 12, 2023
1 parent f91b38e commit 102feb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/api/bkuser_core/config/common/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions src/build/saas/.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/saas/bkuser_shell/config/common/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@

# 蓝鲸智云开发者中心的域名,形如: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/")
# 蓝鲸登录 API URL
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"
Expand Down

0 comments on commit 102feb6

Please sign in to comment.