Open Bliksempie opened 6 years ago
You can add the following to your jquery-bootgrid object definition (how I use it for Laravel)
post: function ()
{
return {
_token:"{{ csrf_token() }}",
};
},
Thank you, bellwood! I will check it out, and provide feedback to close if it works :-)
I have searched everywhere, and there does not seem to be a way to get the listing to work with CSRF protection enabled in CodeIgniter. It shows "No results found" but when I disabled CSRF in CodeIgniter, listings work again.
I have tried to add the CSRF fields, as per CodeIgniter's requirements, into the following config sections of BootGrid:
Entry looks like this:
csrf_test_name: "24be586ffee23e859527a847a36cc99c",
Looking at the source, the search field does not have a form tag, and thus, I suspect that is why these two items I have added does not do anything, as those CSRF token data needs to be added as a hidden field inside a form.
Please can this be resolved? I really do not want to disable CSRF security in favour of a grid tool :-(
Kind regards,
Blix