From 9ae4d558c173eba95d52a60cb0fc7838de9d9bbc Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Wed, 23 Jan 2019 15:12:45 +0800 Subject: [PATCH] doc map bug fix --- src/Logging/LogstashFormatter.php | 4 ---- src/Providers/LumenServerServiceProvider.php | 2 ++ src/Server/JsonRpcServerDoc.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Logging/LogstashFormatter.php b/src/Logging/LogstashFormatter.php index 6c54a59..7955242 100644 --- a/src/Logging/LogstashFormatter.php +++ b/src/Logging/LogstashFormatter.php @@ -40,10 +40,6 @@ class LogstashFormatter extends NormalizerFormatter // if (isset($record['channel'])) { // $message['channel'] = $record['channel']; // } - - if (isset($record['x-client-app'])) { - $message['client_app'] = $record['x_client_app']; - } if (isset($record['level_name'])) { $message['level'] = $record['level_name']; } diff --git a/src/Providers/LumenServerServiceProvider.php b/src/Providers/LumenServerServiceProvider.php index 575d31e..a24f898 100644 --- a/src/Providers/LumenServerServiceProvider.php +++ b/src/Providers/LumenServerServiceProvider.php @@ -4,6 +4,7 @@ namespace JsonRpc\Providers; use JsonRpc\Exception\RpcServerException; use JsonRpc\Middleware\Security; +use JsonRpc\Middleware\TunnelMiddleware; use JsonRpc\Server\JsonRpcDoc; use JsonRpc\Server\JsonRpcServer; use JsonRpc\Server\JsonRpcTool; @@ -24,6 +25,7 @@ class LumenServerServiceProvider extends LoggerServiceProvider public function boot() { + $this->app->middleware(TunnelMiddleware::class); $this->app->routeMiddleware(['rpc.security' => Security::class]); $this->app->router->group([ 'prefix' => 'rpc', diff --git a/src/Server/JsonRpcServerDoc.php b/src/Server/JsonRpcServerDoc.php index 1dc1f6a..1ea4293 100644 --- a/src/Server/JsonRpcServerDoc.php +++ b/src/Server/JsonRpcServerDoc.php @@ -13,7 +13,7 @@ class JsonRpcDoc public function __construct($config) { - $this->map = include $config['map']; + $this->map = $config['map']; } public function methods()