From 2b65991c51137c09d90e5d2521d2c8d94320d82b Mon Sep 17 00:00:00 2001 From: zebardy Date: Fri, 22 Nov 2019 13:13:11 +0000 Subject: [PATCH] start investigating session auth middleware creation --- routes.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/routes.php b/routes.php index 7c2d7c29..ed9c4397 100644 --- a/routes.php +++ b/routes.php @@ -1,15 +1,18 @@ LoginControllerInstance->GetSessionCookieName()); +fwrite($fp, "*** routing - create session auth middleware time : " . round((microtime(true) - $main_route_time_start),6) . "\n"); + $app->group('', function() { $fp = fopen('/config/data/sql.log', 'a'); @@ -148,7 +151,7 @@ $app->group('', function() fwrite($fp, "*** routing - main route add all routes load time : " . round((microtime(true) - $time_start),6) . "\n"); fclose($fp); -})->add(new SessionAuthMiddleware($appContainer, $appContainer->LoginControllerInstance->GetSessionCookieName())); +})->add($session_auth_middelware); fwrite($fp, "*** routing - main route load time : " . round((microtime(true) - $main_route_time_start),6) . "\n"); $api_route_time_start = microtime(true); @@ -273,5 +276,5 @@ $app->group('/api', function() ])); fwrite($fp, "*** routing - api route load time : " . round((microtime(true) - $api_route_time_start),6) . "\n"); -fwrite($fp, "*** routing - total load time : " . round((microtime(true) - $time_start),6) . "\n"); +fwrite($fp, "*** routing - total load time : " . round((microtime(true) - $route_time_start),6) . "\n"); fclose($fp);