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

This commit is contained in:
Baris Ceviz authored and GitHub committed 2021-02-01 09:31:02 +01:00
1 parent 2f9dadae40
commit 35def0ae45
1 file changed
+1
+1
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 {