fix: 完成商务迁移复核与接口优化并清理历史资料

This commit is contained in:
Yvan
2026-11-04 14:45:02 +08:00
parent 5a96be6a79
commit 297e80827d
176 changed files with 6803 additions and 6002 deletions
+7 -1
View File
@@ -1,6 +1,9 @@
package middleware
import "strings"
import (
"kra/internal/biz/integration"
"strings"
)
// redactedValue replaces a sensitive value in every log line and audit record.
const redactedValue = "***"
@@ -36,6 +39,9 @@ func isSensitiveHeader(key string) bool {
// isSensitivePayloadKey also matches every key ending in "token" so provider
// specific token names stay masked without being enumerated.
func isSensitivePayloadKey(key string) bool {
if integration.IsIntegrationSecretKey(key) {
return true
}
normalized := strings.ToLower(strings.ReplaceAll(strings.ReplaceAll(key, "_", ""), "-", ""))
if _, sensitive := sensitivePayloadKeys[normalized]; sensitive {
return true