From 777afdd1e047c9f461408a9fbcd2b1b31a7be792 Mon Sep 17 00:00:00 2001 From: dongwei <838456736@qq.com> Date: Thu, 31 Jan 2019 15:47:09 +0800 Subject: [PATCH] open tunnel --- src/Middleware/TunnelMiddleware.php | 1 + src/Providers/LumenServerServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Middleware/TunnelMiddleware.php b/src/Middleware/TunnelMiddleware.php index 2c0ffb8..1341f26 100644 --- a/src/Middleware/TunnelMiddleware.php +++ b/src/Middleware/TunnelMiddleware.php @@ -39,6 +39,7 @@ class TunnelMiddleware { //过滤tool返回结果 if ($response instanceof JsonResponse) { + app('rpc.logger')->info('record to influxdb', [app()->environment('dev', 'production')]); if (app()->environment('dev', 'production')) { app('rpc.logger')->info('record to influxdb'); $content = $response->getOriginalContent(); diff --git a/src/Providers/LumenServerServiceProvider.php b/src/Providers/LumenServerServiceProvider.php index a247938..a6625a5 100644 --- a/src/Providers/LumenServerServiceProvider.php +++ b/src/Providers/LumenServerServiceProvider.php @@ -26,7 +26,7 @@ class LumenServerServiceProvider extends BaseServiceProvider public function boot() { parent::boot(); -// $this->app->middleware(TunnelMiddleware::class); + $this->app->middleware(TunnelMiddleware::class); $this->app->routeMiddleware(['rpc.security' => Security::class]); $this->app->router->group([ 'prefix' => 'rpc',