feat: support custom http request headers (#868)

This commit is contained in:
Levi authored and GitHub committed 2025-01-16 00:19:50 +08:00
1 parent acc7ed8f6b
commit 0919936050
9 files changed
+160 -67

No files matched your search

+4
View File
@@ -427,6 +427,10 @@ func (f *Fetcher) buildRequest(ctx context.Context, req *base.Request) (httpReq
return
}
httpReq.Header = headers
// Override Host header
if host := headers.Get(base.HttpHeaderHost); host != "" {
httpReq.Host = host
}
return httpReq, nil
}