add client addr for auth plugin

This commit is contained in:
ginuerzh
2023-09-21 19:59:56 +08:00
parent 1760151500
commit ddc3c9392e
11 changed files with 51 additions and 13 deletions

View File

@ -88,6 +88,9 @@ func (h *http2Handler) Handle(ctx context.Context, conn net.Conn, opts ...handle
log.Error(err)
return err
}
ctx = auth_util.ContextWithClientAddr(ctx, auth_util.ClientAddr(conn.RemoteAddr().String()))
md := v.Metadata()
return h.roundTrip(ctx,
md.Get("w").(http.ResponseWriter),