aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/data
diff options
context:
space:
mode:
authorBaris Ceviz <[email protected]>2021-02-01 11:31:02 +0300
committerGitHub <[email protected]>2021-02-01 09:31:02 +0100
commit35def0ae4560bb86febd12663bf5602485ad4b20 (patch)
tree7b61562a2bcafeb48b640bb87ff9b0a30cfe0c98 /tpl/data
parent2f9dadae4072960bbaec3656347e20eec238288c (diff)
downloadhugo-35def0ae4560bb86febd12663bf5602485ad4b20.tar.gz
hugo-35def0ae4560bb86febd12663bf5602485ad4b20.zip
tpl/data: Add default user-agent header for getJSON requests
Diffstat (limited to 'tpl/data')
-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 {