Skip to content

Commit 1a30e12

Browse files
authored
Allow paths without leading slash in probes (#15681)
1 parent 59f6633 commit 1a30e12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/queue/health/probe.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"net/http"
2626
"net/url"
2727
"strconv"
28+
"strings"
2829
"syscall"
2930
"time"
3031

@@ -111,7 +112,7 @@ var transport = func() *http.Transport {
111112
}()
112113

113114
func getURL(config HTTPProbeConfigOptions) (*url.URL, error) {
114-
return url.Parse(string(config.Scheme) + "://" + net.JoinHostPort(config.Host, config.Port.String()) + config.Path)
115+
return url.Parse(string(config.Scheme) + "://" + net.JoinHostPort(config.Host, config.Port.String()) + "/" + strings.TrimPrefix(config.Path, "/"))
115116
}
116117

117118
// http2UpgradeProbe checks that an HTTP with HTTP2 upgrade request

0 commit comments

Comments
 (0)