tpl/data: Add default user-agent header for getJSON requests

This commit is contained in:
Baris Ceviz 2021-02-01 11:31:02 +03:00 committed by GitHub
parent 2f9dadae40
commit 35def0ae45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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 {