2014-06-09 07:02:51 -04:00
|
|
|
var CSRFTokenInitializer = {
|
2014-05-09 00:00:10 -05:00
|
|
|
name: 'csrf-token',
|
|
|
|
|
2014-06-23 18:35:39 +00:00
|
|
|
initialize: function (container, application) {
|
|
|
|
application.register('csrf:token', $('meta[name="csrf-param"]').attr('content'), { instantiate: false });
|
2014-05-09 00:00:10 -05:00
|
|
|
|
2014-06-23 18:35:39 +00:00
|
|
|
application.inject('route', 'csrf', 'csrf:token');
|
|
|
|
application.inject('model', 'csrf', 'csrf:token');
|
|
|
|
application.inject('controller', 'csrf', 'csrf:token');
|
2014-05-09 00:00:10 -05:00
|
|
|
}
|
2014-06-09 07:02:51 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
export default CSRFTokenInitializer;
|