Add Local/Remote ip to metadata
This commit is contained in:
parent
3c496720cc
commit
0672b051cc
@ -97,6 +97,10 @@ func (s *rpcServer) accept(sock transport.Socket) {
|
|||||||
delete(hdr, "Content-Type")
|
delete(hdr, "Content-Type")
|
||||||
delete(hdr, "Timeout")
|
delete(hdr, "Timeout")
|
||||||
|
|
||||||
|
// set local/remote ips
|
||||||
|
hdr["Local"] = sock.Local()
|
||||||
|
hdr["Remote"] = sock.Remote()
|
||||||
|
|
||||||
ctx := metadata.NewContext(context.Background(), hdr)
|
ctx := metadata.NewContext(context.Background(), hdr)
|
||||||
|
|
||||||
// set the timeout if we have it
|
// set the timeout if we have it
|
||||||
|
Loading…
Reference in New Issue
Block a user