From 4545e0ff95caaede5c04761c305ed7810db2caa0 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 8 May 2015 12:35:20 +1000 Subject: [PATCH] Adding request defaults to index utils module --- app/assets/javascripts/admin/index_utils/index_utils.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin/index_utils/index_utils.js.coffee b/app/assets/javascripts/admin/index_utils/index_utils.js.coffee index 46fc050742..0925bf45ed 100644 --- a/app/assets/javascripts/admin/index_utils/index_utils.js.coffee +++ b/app/assets/javascripts/admin/index_utils/index_utils.js.coffee @@ -1 +1 @@ -angular.module("admin.indexUtils", ['ngResource']) \ No newline at end of file +angular.module("admin.indexUtils", ['ngResource']).config ($httpProvider) -> $httpProvider.defaults.headers.common["X-CSRF-Token"] = $("meta[name=csrf-token]").attr("content"); $httpProvider.defaults.headers.common["Accept"] = "application/json, text/javascript, */*"; \ No newline at end of file