Skip to content

Commit

Permalink
Allow paths without leading slash in probes
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto committed Jan 10, 2025
1 parent 28dff5c commit 8821c8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/queue/health/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"net"
"net/http"
"net/url"
"strings"
"syscall"
"time"

Expand Down Expand Up @@ -111,7 +112,7 @@ var transport = func() *http.Transport {
}()

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

// http2UpgradeProbe checks that an HTTP with HTTP2 upgrade request
Expand Down

0 comments on commit 8821c8f

Please sign in to comment.