mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
12 lines
381 B
JavaScript
12 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;
|