mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 16:25:39 +00:00
Enable Cookie, which might have better CDN cache performance
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user