(url: string)
| 121 | } |
| 122 | |
| 123 | export function normalizeUrl(url: string): string { |
| 124 | // Normalize the URL - only add https:// if needed |
| 125 | let normalizedUrl = url |
| 126 | |
| 127 | // Add https:// if no protocol is specified |
| 128 | if (!normalizedUrl.startsWith('http://') && !normalizedUrl.startsWith('https://')) { |
| 129 | normalizedUrl = `https://${normalizedUrl}` |
| 130 | } |
| 131 | |
| 132 | return normalizedUrl |
| 133 | } |