Your IP : 216.73.216.79


Current Path : /var/www/html/bookstack/app/Http/Middleware/
Upload File :
Current File : /var/www/html/bookstack/app/Http/Middleware/StartSessionIfCookieExists.php

<?php

namespace BookStack\Http\Middleware;

use Closure;
use Illuminate\Session\Middleware\StartSession as Middleware;

class StartSessionIfCookieExists extends Middleware
{
    /**
     * Handle an incoming request.
     */
    public function handle($request, Closure $next)
    {
        $sessionCookieName = config('session.cookie');
        if ($request->cookies->has($sessionCookieName)) {
            return parent::handle($request, $next);
        }

        return $next($request);
    }
}