(hostname: string)
| 234 | // 2. Removing www. is allowed: www.example.com -> example.com |
| 235 | // 3. Same host (with or without www.) is allowed: paths can change |
| 236 | const stripWww = (hostname: string) => hostname.replace(/^www\./, '') |
| 237 | const originalHostWithoutWww = stripWww(parsedOriginal.hostname) |
| 238 | const redirectHostWithoutWww = stripWww(parsedRedirect.hostname) |
| 239 | return originalHostWithoutWww === redirectHostWithoutWww |
no outgoing calls
no test coverage detected