mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 04:28:34 +00:00
revert(tools): undo accidental merge of PR #18584
This commit is contained in:
@@ -8,20 +8,6 @@ export const DEFAULT_TIMEOUT_SECONDS = 30;
|
||||
export const DEFAULT_CACHE_TTL_MINUTES = 15;
|
||||
const DEFAULT_CACHE_MAX_ENTRIES = 100;
|
||||
|
||||
export function resolveWebUrlAllowlist(web: unknown): string[] | undefined {
|
||||
if (!web || typeof web !== "object") {
|
||||
return undefined;
|
||||
}
|
||||
if (!("urlAllowlist" in web)) {
|
||||
return undefined;
|
||||
}
|
||||
const allowlist = (web as { urlAllowlist?: unknown }).urlAllowlist;
|
||||
if (!Array.isArray(allowlist)) {
|
||||
return undefined;
|
||||
}
|
||||
return allowlist.length > 0 ? allowlist : undefined;
|
||||
}
|
||||
|
||||
export function resolveTimeoutSeconds(value: unknown, fallback: number): number {
|
||||
const parsed = typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
||||
return Math.max(1, Math.floor(parsed));
|
||||
|
||||
Reference in New Issue
Block a user