summaryrefslogtreecommitdiffstats
path: root/js/app/app.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'js/app/app.coffee')
-rw-r--r--js/app/app.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/app/app.coffee b/js/app/app.coffee
index 03a25c6c4..0c5763bd2 100644
--- a/js/app/app.coffee
+++ b/js/app/app.coffee
@@ -22,7 +22,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
# app main
-angular.module('News', ['OC', 'ui']).config ($provide) ->
+angular.module('News', ['ui']).config ['$provide', '$httpProvider',
+($provide, $httpProvider) ->
$provide.value 'Config', config =
markReadTimeout: 500
scrollTimeout: 500
@@ -33,6 +34,9 @@ angular.module('News', ['OC', 'ui']).config ($provide) ->
# before it starts autopaging
autoPageFactor: 30
+ # Always send the CSRF token by default
+ $httpProvider.defaults.headers.common['requesttoken'] = oc_requesttoken
+]
angular.module('News').run ['Persistence', 'Config',
(Persistence, Config) ->