mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 16:14:25 +03:00
14 lines
450 B
JavaScript
14 lines
450 B
JavaScript
var CSRFTokenInitializer = {
|
|
name: 'csrf-token',
|
|
|
|
initialize: function (container, application) {
|
|
application.register('csrf:token', $('meta[name="csrf-param"]').attr('content'), { instantiate: false });
|
|
|
|
application.inject('route', 'csrf', 'csrf:token');
|
|
application.inject('model', 'csrf', 'csrf:token');
|
|
application.inject('controller', 'csrf', 'csrf:token');
|
|
}
|
|
};
|
|
|
|
export default CSRFTokenInitializer;
|