wpt.fyi icon indicating copy to clipboard operation
wpt.fyi copied to clipboard

Remove hardcoded https scheme and use appropriate scheme depending on environment.

Open DanielRyanSmith opened this issue 3 years ago • 0 comments

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:

https://github.com/web-platform-tests/wpt.fyi/blob/cee243faf76719f174c8b74f6bdeb5ed59d14280/api/query/search.go#L165-L166

Example 2:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/shared/fetch_runs.go#L25-L26

Example 3:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/api/checks/update.go#L234

Example 4:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/shared/appengine.go#L329

Example 5:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/shared/appengine.go#L359

Example 6:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/shared/run_diff.go#L51

Example 7:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/shared/run_diff.go#L383

Example 8:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/webapp/admin_handler.go#L57

Example 9:

https://github.com/web-platform-tests/wpt.fyi/blob/9c7b6931dde8f1976da4798acffe3458b241a426/webapp/login.go#L259

DanielRyanSmith avatar Aug 19 '22 21:08 DanielRyanSmith