open tunnel

This commit is contained in:
dongwei 2019-01-31 15:47:09 +08:00
parent 4e2a2a66be
commit 777afdd1e0
2 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ class TunnelMiddleware
{ {
//过滤tool返回结果 //过滤tool返回结果
if ($response instanceof JsonResponse) { if ($response instanceof JsonResponse) {
app('rpc.logger')->info('record to influxdb', [app()->environment('dev', 'production')]);
if (app()->environment('dev', 'production')) { if (app()->environment('dev', 'production')) {
app('rpc.logger')->info('record to influxdb'); app('rpc.logger')->info('record to influxdb');
$content = $response->getOriginalContent(); $content = $response->getOriginalContent();

View File

@ -26,7 +26,7 @@ class LumenServerServiceProvider extends BaseServiceProvider
public function boot() public function boot()
{ {
parent::boot(); parent::boot();
// $this->app->middleware(TunnelMiddleware::class); $this->app->middleware(TunnelMiddleware::class);
$this->app->routeMiddleware(['rpc.security' => Security::class]); $this->app->routeMiddleware(['rpc.security' => Security::class]);
$this->app->router->group([ $this->app->router->group([
'prefix' => 'rpc', 'prefix' => 'rpc',