Skip to content

Commit

Permalink
Fix HTTP01 challenge url when --acme-http-host is used
Browse files Browse the repository at this point in the history
This commit fixes an issue whith the HTTP-01 challenge URL not having
the insecure port.
  • Loading branch information
maraino committed Jul 9, 2024
1 parent 0eee6f0 commit 8ac876d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acme/challenge.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ func http01Validate(ctx context.Context, ch *Challenge, db DB, jwk *jose.JSONWeb
// Append insecure port if set.
// Only used for testing purposes.
if InsecurePortHTTP01 != 0 {
u.Host += ":" + strconv.Itoa(InsecurePortHTTP01)
insecurePort := strconv.Itoa(InsecurePortHTTP01)
u.Host += ":" + insecurePort
challengeURL.Host += ":" + insecurePort
}

vc := MustClientFromContext(ctx)
Expand Down

0 comments on commit 8ac876d

Please sign in to comment.