mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
tpl/data: Add default user-agent header for getJSON requests
This commit is contained in:
parent
2f9dadae40
commit
35def0ae45
1 changed files with 1 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue