Skip to content

Commit

Permalink
Merge pull request #1919 from smallstep/mariano/fix-acme-http-port
Browse files Browse the repository at this point in the history
Fix HTTP01 challenge url when --acme-http-host is used
  • Loading branch information
maraino authored Jul 9, 2024
2 parents 0eee6f0 + 8ac876d commit e28eae7
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 e28eae7

Please sign in to comment.