Skip to content
Jason edited this page Jul 19, 2014 · 1 revision

Lazo offers cross-site request forgery protection via the Hapi Crumb plugin. The crumb value can be accessed in the rendering context via crumb property. It can also be accessed in by calling the getCookie method of any controller context.

define(['lazoCtl'], function (LazoController) {

    'use strict';

    return LazoController.extend({

        getCrumb: function () {
            return this.ctx.getCookie('crumb');
        }

    });

});