diff --git a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt index 9d565afa90..2a6a16b401 100644 --- a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt +++ b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt @@ -116,7 +116,7 @@ class SecurityAutoConfiguration { // 不应用到服务间调用 registry.addInterceptor(DevxSrcIpInterceptor(properties)) // 需要在[httpAuthInterceptor]之后执行才能取得用户信息, 100为随机取值 - .order(properties.interceptorOrder.toInt()) + .order(properties.interceptorOrder) .excludePathPatterns("/service/**", "/replica/**") } } diff --git a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt index 050a199878..246cb15900 100644 --- a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt +++ b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt @@ -79,5 +79,5 @@ data class DevxProperties( /** * devx拦截器优先级,如果需要取用户信息优先级需要比[HttpAuthInterceptor]拦截器低 */ - var interceptorOrder: Long = (Ordered.LOWEST_PRECEDENCE - 100).toLong(), + var interceptorOrder: Int = Ordered.LOWEST_PRECEDENCE - 100, )