fix_laravel_postman_419
It has been 1071 days since the last update, the content of the article may be outdated.
Laravel 解決使用 postman post 時 419 頁面逾時
1. 將路由加入 VerifyCsrfToken.php
php
protected $except = [ |
2. 路由放在api.php
api
的路由不會經過csrf
驗證
3. 帶入 CSRF Token
也可以帶入 CSRF Token
取得 CSRF Token
php
Route::get('/token', function () { |
再嘗試 POST 一次問題就解決啦
評論
ValineDisqus