SERVER/LARAVEL & PHP

[error] laravel nginx CSRF token mismatch.

나나나나나나나ㅏ나난ㄴ나ㅏ나나 2021. 8. 17. 18:45
728x90

laravel nginx CSRF token mismatch.  오류 수정

 

/app/Http/Middleware/VerifyCsrfToken.php

<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;

class VerifyCsrfToken extends Middleware
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        //
        '/*'
    ];
}

 

$except에 '/*' 추가해주면 해결완료!

728x90