VerifyCsrfToken except is not working

gohano - 3 weeks ago

Hello, I have problem with excluding some of uris from CSRF verification. Unfortunatelly when I set $except = ['api/authenticate']; (App\Http\Middleware\VerifyCsrfToken) It is empty while request is performing. Did anyone has similar problem and found solution? Thanks in advance for your help.

keevitaja - 3 weeks ago

@gohano i do not have the solution for you, but afaik these middlewares in app/ are not used at all in pyro.

gohano - 3 weeks ago

@keevitaja Thanks for answer, I have already found solution. In the \Anomaly\Streams\Platform\Http\Controller\BaseController there is registered: $this->middleware('Illuminate\Foundation\Http\Middleware\VerifyCsrfToken'), which was perfomred after my App\Http\Middleware\VerifyCsrfToken (I have added in Kernel middlewares) . That's why my request was being rejected by Token Mismatch