0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/initializers/csrf-token.js

14 lines
438 B
JavaScript
Raw Normal View History

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;