Enable Cookie, which might have better CDN cache performance

This commit is contained in:
Star Brilliant
2017-11-30 15:53:13 +08:00
parent 892066d4a3
commit c4412e2993

View File

@@ -101,6 +101,7 @@ func NewClient(addr, upstream string, bootstraps []string, timeout uint, noECS,
DualStack: true,
Resolver: bootResolver,
}).DialContext
// Most CDNs require Cookie support to prevent DDoS attack
cookieJar, err := cookiejar.New(nil)
if err != nil { return nil, err }
c.httpClient = &http.Client {