diff --git a/src/Client.php b/src/Client.php index e33c4ad..3510189 100644 --- a/src/Client.php +++ b/src/Client.php @@ -95,9 +95,7 @@ class Client try { $headers = [ - 'client_app' => $this->config['app'], - 'client_host' => gethostname(), - 'client_addr' => $_SERVER['SERVER_ADDR'], + 'x-client-app' => $this->config['app'], ]; app('rpc.logger')->info("client_request",array_merge($this->server_config, $payload)); $resp = $this->http->request('POST', 'rpc/json-rpc-v2.json', [ diff --git a/src/Server/JsonRpcServer.php b/src/Server/JsonRpcServer.php index 465a550..c1910bc 100644 --- a/src/Server/JsonRpcServer.php +++ b/src/Server/JsonRpcServer.php @@ -63,7 +63,7 @@ class JsonRpcServer return $this->error(self::Rpc_Error_Invalid_Params); } - app('rpc.logger')->info('server', [$id, $class,$method, $params, $this->request->header('client_app'), $this->request->header('client_addr'), $this->request->header('client_host')]); + app('rpc.logger')->info('server', [$id, $class,$method, $params, $this->request->header('x-client-app')]); $ret = call_user_func_array([(new $class($id, $this->request)), $function], $params); app('rpc.logger')->info('server_result', [$id, $ret]);