feat: add "Host" header

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-30 19:24:40 +02:00
parent 8211d87379
commit 36eab35576
2 changed files with 9 additions and 0 deletions
+3
View File
@@ -14,6 +14,9 @@ func FormatRawRequest(f *proxy.Flow) string {
r := f.Request
var sb strings.Builder
fmt.Fprintf(&sb, "%s %s %s\n", r.Method, r.URL.RequestURI(), r.Proto)
if r.URL.Host != "" {
fmt.Fprintf(&sb, "Host: %s\n", r.URL.Host)
}
for _, line := range util.SortedHeaderLines(r.Header) {
sb.WriteString(line)
}