Skip to content

Commit 579484d

Browse files
committed
Fix handling of inferred healthz path when checking server status
Fix issue where workspaces with a mainUrl with path that did not end in a '/' resulted in the incorrect path for the '/healthz' endpoint due to DWO only concatenating strings. Signed-off-by: Angel Misevski <[email protected]>
1 parent 57601bd commit 579484d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controllers/workspace/status.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"context"
2020
"fmt"
2121
"net/url"
22+
"path"
2223
"sort"
2324
"time"
2425

@@ -165,7 +166,7 @@ func checkServerStatus(workspace *common.DevWorkspaceWithConfig) (ok bool, err e
165166
if err != nil {
166167
return false, err
167168
}
168-
healthz.Path = healthz.Path + "healthz"
169+
healthz.Path = path.Join(healthz.Path, "healthz")
169170

170171
resp, err := healthCheckHttpClient.Get(healthz.String())
171172
if err != nil {

0 commit comments

Comments
 (0)