fix: enforce HTTPS to the ACME server (#2608)

This commit is contained in:
Ludovic Fernandez 2025-08-01 16:35:07 +02:00 committed by GitHub
commit 238454b5f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 161 additions and 107 deletions

View file

@ -17,7 +17,7 @@ func MockACMEServer() *servermock.Builder[string] {
return server.URL, nil
}).
Route("GET /dir", http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
serverURL := fmt.Sprintf("http://%s", req.Context().Value(http.LocalAddrContextKey))
serverURL := fmt.Sprintf("https://%s", req.Context().Value(http.LocalAddrContextKey))
servermock.JSONEncode(acme.Directory{
NewNonceURL: serverURL + "/nonce",