mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 17:43:05 +00:00
refactor: dedupe lowercase helper readers
This commit is contained in:
@@ -10,6 +10,7 @@ import { resolveStateDir, type OpenClawConfig } from "../config/config.js";
|
||||
import { coerceSecretRef } from "../config/types.secrets.js";
|
||||
import { resolveSecretInputRef, type SecretRef } from "../config/types.secrets.js";
|
||||
import { formatErrorMessage } from "../infra/errors.js";
|
||||
import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js";
|
||||
import { resolveConfigDir, resolveUserPath } from "../utils.js";
|
||||
import { runTasksWithConcurrency } from "../utils/run-with-concurrency.js";
|
||||
import { iterateAuthProfileCredentials } from "./auth-profiles-scan.js";
|
||||
@@ -127,7 +128,7 @@ const SENSITIVE_MODEL_PROVIDER_HEADER_NAME_FRAGMENTS = [
|
||||
];
|
||||
|
||||
function isLikelySensitiveModelProviderHeaderName(value: string): boolean {
|
||||
const normalized = value.trim().toLowerCase();
|
||||
const normalized = normalizeLowercaseStringOrEmpty(value);
|
||||
if (!normalized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user