Ghost/core/client/initializers/csrf.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

13 lines
368 B
JavaScript

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