projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f9dada
)
tpl/data: Add default user-agent header for getJSON requests
author
Baris Ceviz
<me@barisceviz.com>
Mon, 1 Feb 2021 08:31:02 +0000
(11:31 +0300)
committer
GitHub
<noreply@github.com>
Mon, 1 Feb 2021 08:31:02 +0000
(09:31 +0100)
tpl/data/data.go
patch
|
blob
|
history
diff --git
a/tpl/data/data.go
b/tpl/data/data.go
index 15d042e0ae2f3714dc9808308fa30db8f62eeac7..d383447aca0764944f99b5f5b66c5b8b2c42035c 100644
(file)
--- 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 {