-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Background
There are places in the code where the url scheme is hardcoded to https
. As a result, when a developer has all of the micro services up locally, the webapp micro service cannot call the search cache service because the scheme is hardcoded.
Definition of Done
- Find all places of hardcoded with
https
and have it use the appropriate scheme depending on where it is deployed (locally or google cloud) - The microservices work together not only when deployed but locally.
Examples (not exhaustive)
Example 1:
Lines 165 to 166 in cee243f
// TODO(Issue #2941): This will not work when hostname is localhost (http scheme needed). | |
fwdURL, err := url.Parse(fmt.Sprintf("https://%s/api/search/cache", hostname)) |
Example 2:
Lines 25 to 26 in 9c7b693
url := "https://" + wptdHost + "/api/runs" | |
url += "?" + filter.OrDefault().ToQuery().Encode() |
Example 3:
Line 234 in 9c7b693
HostURL: fmt.Sprintf("https://%s/", host), |
Example 4:
Line 329 in 9c7b693
result, _ := url.Parse(fmt.Sprintf("https://%s%s", a.GetVersionedHostname(), "/api/results/upload")) |
Example 5:
Line 359 in 9c7b693
detailsURL, _ := url.Parse(fmt.Sprintf("https://%s%s", host, path)) |
Example 6:
Line 51 in 9c7b693
detailsURL, _ := url.Parse(fmt.Sprintf("https://%s/results/", d.aeAPI.GetHostname())) |
Example 7:
Line 383 in 9c7b693
diffURL, _ := url.Parse(fmt.Sprintf("https://%s/api/search", d.aeAPI.GetVersionedHostname())) |
Example 8:
wpt.fyi/webapp/admin_handler.go
Line 57 in 9c7b693
CallbackURL: fmt.Sprintf("https://%s/api/results/create", a.GetVersionedHostname()), |
Example 9:
Line 259 in 9c7b693
callback := url.URL{Scheme: "https", Host: r.Host, Path: "oauth"} |