Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBaris Ceviz <me@barisceviz.com>2021-02-01 11:31:02 +0300
committerGitHub <noreply@github.com>2021-02-01 11:31:02 +0300
commit35def0ae4560bb86febd12663bf5602485ad4b20 (patch)
tree7b61562a2bcafeb48b640bb87ff9b0a30cfe0c98 /tpl
parent2f9dadae4072960bbaec3656347e20eec238288c (diff)
tpl/data: Add default user-agent header for getJSON requests
Diffstat (limited to 'tpl')
-rw-r--r--tpl/data/data.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/tpl/data/data.go b/tpl/data/data.go
index 15d042e0a..d383447ac 100644
--- a/tpl/data/data.go
+++ b/tpl/data/data.go
@@ -116,6 +116,7 @@ func (ns *Namespace) GetJSON(urlParts ...interface{}) (interface{}, error) {
}
req.Header.Add("Accept", "application/json")
+ req.Header.Add("User-Agent", "Hugo Static Site Generator")
err = ns.getResource(cache, unmarshal, req)
if err != nil {