use the common httppb
This commit is contained in:
parent
a3007ba1b5
commit
da9221ce34
17
http.go
17
http.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue