use the common httppb

This commit is contained in:
Jeff Carr 2025-09-08 01:34:33 -05:00
parent a3007ba1b5
commit da9221ce34
1 changed files with 9 additions and 8 deletions

17
http.go
View File

@ -12,6 +12,7 @@ import (
"strings"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/lib/protobuf/httppb"
"go.wit.com/log"
)
@ -117,14 +118,14 @@ func (pb *Patches) AddHttpToPB(r *http.Request) error {
}
}
pb.HttpRequest = &Patches_HttpRequest{
Method: r.Method,
Url: r.URL.String(),
Proto: r.Proto,
Headers: headers,
RemoteAddr: getClientIP(r),
Host: r.Host,
Hostname: r.Header.Get("hostname"),
pb.HttpRequest = &httppb.HttpRequest{
Method: r.Method,
URL: r.URL.String(),
Proto: r.Proto,
Headers: headers,
IP: getClientIP(r),
Host: r.Host,
Hostname: r.Header.Get("hostname"),
}
// pb.HttpRequest.Route = cleanURL(r.URL.Path)
return nil