Enable Cookie, which might have better CDN cache performance

This commit is contained in:
Star Brilliant
2017-11-30 15:48:45 +08:00
parent 14c2a35fe3
commit 892066d4a3

View File

@@ -32,6 +32,7 @@ import (
"log"
"net"
"net/http"
"net/http/cookiejar"
"net/url"
"strconv"
"strings"
@@ -100,8 +101,11 @@ func NewClient(addr, upstream string, bootstraps []string, timeout uint, noECS,
DualStack: true,
Resolver: bootResolver,
}).DialContext
cookieJar, err := cookiejar.New(nil)
if err != nil { return nil, err }
c.httpClient = &http.Client {
Transport: &httpTransport,
Jar: cookieJar,
}
return c, nil
}