I would like to add a custom header to an AJAX POST request from jQuery.
I have tried this:
$.ajax({ type: \'POST\', url: url, headers:
Try to use the rack-cors gem. And add the header field in your Ajax call.