GetHTTPURL returns the HTTP URL for an app.
()
| 3446 | |
| 3447 | // GetHTTPURL returns the HTTP URL for an app. |
| 3448 | func (app *DdevApp) GetHTTPURL() string { |
| 3449 | url := "" |
| 3450 | if !IsRouterDisabled(app) { |
| 3451 | url = "http://" + app.GetHostname() |
| 3452 | // If the HTTP port is the default "80", it's not included in the URL |
| 3453 | if app.GetPrimaryRouterHTTPPort() != "80" { |
| 3454 | url = url + ":" + app.GetPrimaryRouterHTTPPort() |
| 3455 | } |
| 3456 | } else { |
| 3457 | url = app.GetWebContainerDirectHTTPURL() |
| 3458 | } |
| 3459 | return url |
| 3460 | } |
| 3461 | |
| 3462 | // GetHTTPSURL returns the primary HTTPS URL for an app. |
| 3463 | func (app *DdevApp) GetHTTPSURL() string { |