havietduc91 / laravel5

Something about laravel 5
0 stars 0 forks source link

Lỗi hay gặp #2

Open havietduc91 opened 8 years ago

havietduc91 commented 8 years ago

http://stackoverflow.com/questions/30490821/laravel-5-tokenmismatchexception-on-php-5-6-9/30508294#30508294

Thay thế VerifyCsrfToken trong App\Http\Middleware;

    public function handle($request, Closure $next)
    {
        return parent::handle($request, $next);
    }

->

    public function handle($request, Closure $next)
    {
        $response = $next($request);

        if (last(explode('\\',get_class($response))) != 'RedirectResponse') {
            $response->header('P3P', 'CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
        }

        return $response;
    }
havietduc91 commented 8 years ago

Auth session killed after redirect

-> In .env file set DOMAIN=cvbank.dev like real domain