(preferredUrl)
| 69 | } |
| 70 | |
| 71 | async function resolveExistingServiceUrl(preferredUrl) { |
| 72 | for (const serviceUrl of serviceUrlCandidates(preferredUrl)) { |
| 73 | if (await isServerHealthy(serviceUrl)) { |
| 74 | return serviceUrl; |
| 75 | } |
| 76 | } |
| 77 | return ""; |
| 78 | } |
| 79 | |
| 80 | function serviceUrlCandidates(preferredUrl) { |
| 81 | if (sameOrigin(preferredUrl, DEFAULT_SERVICE_URL)) { |
no test coverage detected