How to use the cookies.setBrowserCookie function in cookies

To help you get started, we’ve selected a few cookies examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kanso / kanso / packages / duality-flashmessages / duality / flashmessages.js View on Github external
exports.setBrowserCookie = function (req, messages) {
    cookies.setBrowserCookie(req, {
        name: '_duality_flash',
        value: JSON.stringify(messages),
        path: require('duality/core').getBaseURL(req) + '/'
    });
};