(host)
| 1049 | function normalizeFallbackRouteHosts(value, primaryHost) { |
| 1050 | const hosts = []; |
| 1051 | const addHost = (host) => { |
| 1052 | const raw = stringValue(host); |
| 1053 | if (!raw) { |
| 1054 | return; |
| 1055 | } |
| 1056 | const normalized = raw.replace(/^https?:\/\//i, "").replace(/\/.*$/, "").toLowerCase(); |
| 1057 | if (normalized && normalized !== primaryHost.toLowerCase() && !hosts.includes(normalized)) { |
| 1058 | hosts.push(normalized); |
| 1059 | } |
| 1060 | }; |
| 1061 | DEFAULT_FALLBACK_ROUTE_HOSTS.forEach(addHost); |
| 1062 | if (Array.isArray(value)) { |
| 1063 | value.forEach(addHost); |
no test coverage detected
searching dependent graphs…