Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

336 B
Raw Blame
export function linkPreviewDestination(url: string, origin?: string) {
  try {
    const destination = new URL(url, origin);
    if (
      !['http:', 'https:'].includes(destination.protocol) ||
      destination.username ||
      destination.password
    )
      return null;
    return destination;
  } catch {
    return null;
  }
}