Good morning,
I'm having trouble isolating the CSRF protection to just my pages.
I would like this check not to be done for the API, but I came across this conflict:
Code:
public $globals = [
'before' => [
'autorizacao' => [
'except' => [
'dashboard/login',
'ajax/usuario/login',
'dashboard/esqueceu-senha',
'api/*'
]
],
'csrf' => [ // THIS RULE IS NOT WORKING
'except' => [
'api/*'
]
],
],
'after' => [
'toolbar',
],
];
It seems to me that there is a conflict that this rule:
Code:
public $methods = [
'post' => ['csrf']
];
because the "api/*" endpoints are always checked due to the "method" being set to "post".