You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a CSRF protection is quite daunting in Foal. This should be made easier. Laravel gives a good example of an easy solution: https://laravel.com/docs/7.x/csrf
Solution
Always generate a session token when creating a session (even if the CSRF protection is disabled, otherwise it could lead to issues if enabling the protection later).
Maybe integrate the protection in @TokenRequired directly with the possibility of disabling the protection @TokenRequired({ cookie: true, csrf: false }). It would also integrate the setCsrfToken function.
The text was updated successfully, but these errors were encountered:
Issue
Adding a CSRF protection is quite daunting in Foal. This should be made easier. Laravel gives a good example of an easy solution: https://laravel.com/docs/7.x/csrf
Solution
Always generate a session token when creating a session (even if the CSRF protection is disabled, otherwise it could lead to issues if enabling the protection later).
Maybe integrate the protection in
@TokenRequired
directly with the possibility of disabling the protection@TokenRequired({ cookie: true, csrf: false })
. It would also integrate thesetCsrfToken
function.The text was updated successfully, but these errors were encountered: