summaryrefslogtreecommitdiffstats
path: root/js/app/app.coffee
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-08 22:19:19 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-08 22:19:19 +0200
commit68f5a01dc692e9bf6c0a60e584d1600adcae3a62 (patch)
tree372b2366855b96a7b724c426c7c5ae0241e933f1 /js/app/app.coffee
parenta9b34deefd67e08a79ddefb0e1f980f6a6c1249d (diff)
port javascript from appframework
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) ->