Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support paas_inner_host env #1231

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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