Files
openclaw/src/gateway/input-allowlist.ts
2026-03-07 17:05:23 +00:00

10 lines
326 B
TypeScript

export function normalizeInputHostnameAllowlist(
values: string[] | undefined,
): string[] | undefined {
if (!values || values.length === 0) {
return undefined;
}
const normalized = values.map((value) => value.trim()).filter((value) => value.length > 0);
return normalized.length > 0 ? normalized : undefined;
}