mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
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.
12 lines
368 B
JavaScript
12 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;
|