public/javascripts/c2/informant/init.js in c2-0.1.4 vs public/javascripts/c2/informant/init.js in c2-0.1.5
- old
+ new
@@ -20,9 +20,15 @@
.js(app_dir + 'models/entry.js')
.js(app_dir + 'collections/locus.js')
.js(app_dir + 'collections/buckets.js')
.js(app_dir + 'collections/entries.js', function() {
$(function() {
+ // CSRF Load
+ $(document).ajaxSend(function(e, xhr, options) {
+ var token = $("meta[name='csrf-token']").attr("content");
+ xhr.setRequestHeader("X-CSRF-Token", token);
+ });
+
window.location.hash = '/';
// Get a Backbone
Informant.init();