add header
This commit is contained in:
parent
d5470ca40d
commit
8909b516ad
|
@ -95,9 +95,7 @@ class Client
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$headers = [
|
$headers = [
|
||||||
'client_app' => $this->config['app'],
|
'x-client-app' => $this->config['app'],
|
||||||
'client_host' => gethostname(),
|
|
||||||
'client_addr' => $_SERVER['SERVER_ADDR'],
|
|
||||||
];
|
];
|
||||||
app('rpc.logger')->info("client_request",array_merge($this->server_config, $payload));
|
app('rpc.logger')->info("client_request",array_merge($this->server_config, $payload));
|
||||||
$resp = $this->http->request('POST', 'rpc/json-rpc-v2.json', [
|
$resp = $this->http->request('POST', 'rpc/json-rpc-v2.json', [
|
||||||
|
|
|
@ -63,7 +63,7 @@ class JsonRpcServer
|
||||||
return $this->error(self::Rpc_Error_Invalid_Params);
|
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);
|
$ret = call_user_func_array([(new $class($id, $this->request)), $function], $params);
|
||||||
app('rpc.logger')->info('server_result', [$id, $ret]);
|
app('rpc.logger')->info('server_result', [$id, $ret]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user