summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-08 01:34:33 -0500
committerJeff Carr <[email protected]>2025-09-08 01:34:33 -0500
commitda9221ce3445ed0744cc80d357ba08b6618ed685 (patch)
treeb38621ae69da571ca8b05853ff8c4cb57808ce9d
parenta3007ba1b5c5d7e9edd939303f112ba041097f60 (diff)
use the common httppb
-rw-r--r--http.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/http.go b/http.go
index c278558..e89744e 100644
--- a/http.go
+++ b/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