소스 검색

Fix HTTP01 challenge url when --acme-http-host is used

This commit fixes an issue whith the HTTP-01 challenge URL not having
the insecure port.
Mariano Cano 2 년 전
부모
커밋
8ac876df3a
1개의 변경된 파일과 3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      acme/challenge.go

+ 3 - 1
acme/challenge.go

@@ -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)