Ghost/core/client/initializers/csrf-token.js
Robert Jackson 333beb2198 Make exports consitent.
Previously, the exports were somewhat random with some files declaring
local variables then immediately exporting them, and others simply
doing the work needed in the export itself.
2014-06-09 13:58:35 -04:00

14 lines
438 B
JavaScript

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