-
Laravel) HTTP post 메소드 419 Page Expired 해결방법Programing Language/PHP 2021. 8. 3. 16:23728x90반응형
app/Http/Middleware/VerifyCsrfToken.php 파일에서
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; class VerifyCsrfToken extends Middleware { protected $addHttpCookie = true; public function handle($request, Closure $next) { $response = $next($request); $response->header('P3P','CP="IDC DSP COR ADM DEVi TATi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'); return $response; //return parent::handle($request, $next); // TODO: Change the autogenerated stub } /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ // '/post' ]; }
https://medium.com/sjk5766/laravel-http-post-%EB%A9%94%EC%86%8C%EB%93%9C-page-expired-e3f259de3139
728x90반응형'Programing Language > PHP' 카테고리의 다른 글
PHP) 클래스와 지시자 (->) 문법 (0) 2021.08.03 Laravel) Json Request를 Controller에서 다루기 (0) 2021.08.03 Laravel) Log파일 접근 권한 설정 (0) 2021.08.03 Laravel) Nginx + Laravel(라라벨) 설정 (0) 2021.08.03 PHP) PHP로 FCM보내기 (0) 2020.11.11