[chore] Set User-Agent header in transport (#1154)

Currently requests set their own User-Agent. This moves it down to set
it in the transport's do() method, to guarantee it's always set on all
requests.
This commit is contained in:
Daniele Sluijters 2022-11-26 21:19:42 +01:00 committed by GitHub
commit c5ae88c51b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 7 deletions

View file

@ -82,7 +82,6 @@ func (t *transport) Deliver(ctx context.Context, b []byte, to *url.URL) error {
req.Header.Add("Content-Type", string(api.AppActivityLDJSON))
req.Header.Add("Accept-Charset", "utf-8")
req.Header.Add("User-Agent", t.controller.userAgent)
req.Header.Set("Host", to.Host)
resp, err := t.POST(req, b)