]> BookStack Code Mirror - bookstack/blob - app/Http/Middleware/StartSessionIfCookieExists.php
WYSIWYG: Updated TinyMCE from 6.5.1 to 6.7.2
[bookstack] / app / Http / Middleware / StartSessionIfCookieExists.php
1 <?php
2
3 namespace BookStack\Http\Middleware;
4
5 use Closure;
6 use Illuminate\Session\Middleware\StartSession as Middleware;
7
8 class StartSessionIfCookieExists extends Middleware
9 {
10     /**
11      * Handle an incoming request.
12      */
13     public function handle($request, Closure $next)
14     {
15         $sessionCookieName = config('session.cookie');
16         if ($request->cookies->has($sessionCookieName)) {
17             return parent::handle($request, $next);
18         }
19
20         return $next($request);
21     }
22 }