export function normalizedHttpUrl(value: unknown): string | null { if (typeof value !== "string") return null; const trimmed = value.trim(); if (!trimmed) return null; try { const url = new URL(trimmed); return url.protocol === "https:" || url.protocol === "http:" ? trimmed : null; } catch { return null; } }