mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
tpl/data: Add default user-agent header for getJSON requests
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user