Ghost/ghost/admin/initializers/csrf.js
2014-06-23 18:35:39 +00:00

13 lines
381 B
JavaScript

var CSRFInitializer = {
name: 'csrf',
initialize: function (container, application) {
application.register('csrf:current', $('meta[name="csrf-param"]').attr('content'), { instantiate: false });
application.inject('route', 'csrf', 'csrf:current');
application.inject('controller', 'csrf', 'csrf:current');
}
};
export default CSRFInitializer;