Add max-stale cache control directive to requests

This commit is contained in:
Frank Denis 2020-07-09 21:42:19 +02:00
parent 8dd4612ea7
commit 1a34c8d5ff
1 changed files with 1 additions and 0 deletions

View File

@ -350,6 +350,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
if len(contentType) > 0 {
header["Content-Type"] = []string{contentType}
}
header["Cache-Control"] = []string{"max-stale"}
if body != nil {
h := sha512.Sum512(*body)
qs := url.Query()