mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-04 21:42:57 +02:00
Add Local/Remote ip to metadata
This commit is contained in:
@ -97,6 +97,10 @@ func (s *rpcServer) accept(sock transport.Socket) {
|
||||
delete(hdr, "Content-Type")
|
||||
delete(hdr, "Timeout")
|
||||
|
||||
// set local/remote ips
|
||||
hdr["Local"] = sock.Local()
|
||||
hdr["Remote"] = sock.Remote()
|
||||
|
||||
ctx := metadata.NewContext(context.Background(), hdr)
|
||||
|
||||
// set the timeout if we have it
|
||||
|
Reference in New Issue
Block a user