I am working on codeigniter project and when I enable CSRF protection in config file and added csrf token hidden field in all forms site working fine but due to this I am facing one problem i.e. "The action you have requested is not allowed" while uploading images using dropzone.
How to pass the csrf token in dropzone js?
When I upload image in dropzone box it gives error:
The action you have requested is not allowed.
<div class="dropzone clsbox" id="mydropzone">
</div>
$("div#mydropzone").dropzone({
url: "/riftraff/insert_product_phase_final",
headers: {
'X-CSRFToken': $('meta[name="_token"]').attr('content')
}
});