mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-30 02:13:31 -06:00
[bugfix] Set the Host header within the signing transport (#2799)
This commit is contained in:
parent
d61d5c8a6a
commit
e664d0918b
7 changed files with 3 additions and 9 deletions
|
|
@ -68,7 +68,6 @@ func prepWebfingerReq(ctx context.Context, loc, domain, username string) (*http.
|
|||
// including Gin itself. So concat the accept header with a comma
|
||||
// instead which seems to work reliably
|
||||
req.Header.Add("Accept", string(apiutil.AppJRDJSON)+","+string(apiutil.AppJSON))
|
||||
req.Header.Set("Host", req.URL.Host)
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
|
@ -187,7 +186,6 @@ func (t *transport) webfingerFromHostMeta(ctx context.Context, targetDomain stri
|
|||
// We're doing XML
|
||||
req.Header.Add("Accept", string(apiutil.AppXML))
|
||||
req.Header.Add("Accept", "application/xrd+xml")
|
||||
req.Header.Set("Host", req.URL.Host)
|
||||
|
||||
// Perform the HTTP request
|
||||
rsp, err := t.GET(req)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue