MCPcopy Index your code
hub / github.com/ddev/ddev / GetHTTPURL

Method GetHTTPURL

pkg/ddevapp/ddevapp.go:3448–3460  ·  view source on GitHub ↗

GetHTTPURL returns the HTTP URL for an app.

()

Source from the content-addressed store, hash-verified

3446
3447// GetHTTPURL returns the HTTP URL for an app.
3448func (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.
3463func (app *DdevApp) GetHTTPSURL() string {

Callers 9

TestPHPOverridesFunction · 0.95
TestPHPConfigFunction · 0.95
DescribeMethod · 0.95
runNetworkAliasesTestFunction · 0.95
TestGetLocalHTTPResponseFunction · 0.95
TestHttpsRedirectionFunction · 0.80
TestUseEphemeralPortFunction · 0.80
TestCmdListFunction · 0.80

Calls 4

GetHostnameMethod · 0.95
IsRouterDisabledFunction · 0.85

Tested by 8

TestPHPOverridesFunction · 0.76
TestPHPConfigFunction · 0.76
runNetworkAliasesTestFunction · 0.76
TestGetLocalHTTPResponseFunction · 0.76
TestHttpsRedirectionFunction · 0.64
TestUseEphemeralPortFunction · 0.64
TestCmdListFunction · 0.64