diff options
| author | 2024-04-02 13:28:36 +0100 | |
|---|---|---|
| committer | 2024-04-02 14:28:36 +0200 | |
| commit | e664d0918b2ea004a2498cb67a6e0b4b3b3666f3 (patch) | |
| tree | 39b85b1a9ad67ac3ac6bae348e43e01de46993ed /internal/httpclient/sign.go | |
| parent | [bugfix] httpclient not signing subsequent redirect requests (#2798) (diff) | |
| download | gotosocial-e664d0918b2ea004a2498cb67a6e0b4b3b3666f3.tar.xz | |
[bugfix] Set the `Host` header within the signing transport (#2799)
Diffstat (limited to 'internal/httpclient/sign.go')
| -rw-r--r-- | internal/httpclient/sign.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/httpclient/sign.go b/internal/httpclient/sign.go index 8e66d1bda..6b561c45a 100644 --- a/internal/httpclient/sign.go +++ b/internal/httpclient/sign.go @@ -37,6 +37,9 @@ type signingtransport struct { } func (t *signingtransport) RoundTrip(r *http.Request) (*http.Response, error) { + // Ensure updated host always set. + r.Header.Set("Host", r.URL.Host) + if sign := gtscontext.HTTPClientSignFunc(r.Context()); sign != nil { // Reset signing header fields now := time.Now().UTC() |
