GetPrimaryURL returns the primary URL that can be used, https or http
()
| 3517 | |
| 3518 | // GetPrimaryURL returns the primary URL that can be used, https or http |
| 3519 | func (app *DdevApp) GetPrimaryURL() string { |
| 3520 | httpURLs, httpsURLs, _ := app.GetAllURLs() |
| 3521 | urlList := httpsURLs |
| 3522 | // If no mkcert trusted https, use the httpURLs instead |
| 3523 | if app.CanUseHTTPOnly() { |
| 3524 | urlList = httpURLs |
| 3525 | } |
| 3526 | if len(urlList) > 0 { |
| 3527 | return urlList[0] |
| 3528 | } |
| 3529 | // Failure mode, returns an empty string |
| 3530 | return "" |
| 3531 | } |
| 3532 | |
| 3533 | // GetWebContainerDirectHTTPURL returns the URL that can be used without the router to get to web container. |
| 3534 | func (app *DdevApp) GetWebContainerDirectHTTPURL() string { |