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 when the http-01 challenge url didn't had the
insecure port.
  • Loading branch information
maraino committed Jul 9, 2024
1 parent 0eee6f0 commit f3a81b8
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 f3a81b8

Please sign in to comment.