Enable cookies on acme client

pull/1834/head
arontsang 4 weeks ago committed by GitHub
parent e3ba702811
commit e531e0c079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,7 @@ import (
"crypto/tls" "crypto/tls"
"net" "net"
"net/http" "net/http"
"net/http/cookiejar"
"time" "time"
) )
@ -51,8 +52,13 @@ type client struct {
// NewClient returns an implementation of Client for verifying ACME challenges. // NewClient returns an implementation of Client for verifying ACME challenges.
func NewClient() Client { func NewClient() Client {
jar, err := cookiejar.New(nil)
if err != nil {
panic(err)
}
return &client{ return &client{
http: &http.Client{ http: &http.Client{
Jar: jar,
Timeout: 30 * time.Second, Timeout: 30 * time.Second,
Transport: &http.Transport{ Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment, Proxy: http.ProxyFromEnvironment,

Loading…
Cancel
Save