mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
fix: enforce HTTPS to the ACME server (#2608)
This commit is contained in:
parent
b4ddc1e5e2
commit
238454b5f7
16 changed files with 161 additions and 107 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue