Skip to content

Commit

Permalink
bug: OPENAPI 用户态需支持动态路由 TencentBlueKing#6033
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzcao committed Jan 18, 2022
1 parent 5f57e79 commit 1c5f4e3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class ApiAspect(
for (index in parameterValue.indices) {
when (parameterNames[index]) {
"projectId" -> projectId = parameterValue[index]?.toString()
"projectCode" -> projectId = parameterValue[index]?.toString()
"appCode" -> appCode = parameterValue[index]?.toString()
"apigwType" -> apigwType = parameterValue[index]?.toString()
else -> Unit
Expand Down Expand Up @@ -109,7 +110,9 @@ class ApiAspect(
message = "Permission denied: apigwType[$apigwType],appCode[$appCode],ProjectId[$projectId]"
)
}
}

if (projectId != null) {
// openAPI 网关无法判别项目信息, 切面捕获project信息。 剩余一种URI内无${projectId}的情况,接口自行处理
val projectConsulTag = redisOperation.hget(PROJECT_TAG_REDIS_KEY, projectId)
if (!projectConsulTag.isNullOrEmpty()) {
Expand Down

0 comments on commit 1c5f4e3

Please sign in to comment.