fix: 完成商务迁移复核与接口优化并清理历史资料
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user