Add a user-agent on HTTP self-checks

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
Maartje Eyskens
2020-06-30 09:27:33 +02:00
parent 2f035e9337
commit 2f950b0a58
+2
View File
@@ -35,6 +35,7 @@ import (
"github.com/jetstack/cert-manager/pkg/controller"
"github.com/jetstack/cert-manager/pkg/issuer/acme/http/solver"
logf "github.com/jetstack/cert-manager/pkg/logs"
pkgutil "github.com/jetstack/cert-manager/pkg/util"
)
const (
@@ -175,6 +176,7 @@ func testReachability(ctx context.Context, url *url.URL, key string) error {
Method: http.MethodGet,
URL: url,
}
req.Header.Set("User-Agent", pkgutil.CertManagerUserAgent)
req = req.WithContext(ctx)
// ACME spec says that a verifier should try