src/middleware/request-logger.js
function getConversationId(req, res, options) {
    var cookieName = options.conversationIdCookieName;
    var headerName = options.conversationIdHeader;
    var conversationId = req.headers[headerName] || req.cookies && req.cookies[cookieName];
    if (!conversationId) {
        conversationId = uuid.v1();
    }
    req.conversationId = conversationId;
    res.cookie(cookieName, conversationId, { path: '/' });
    return conversationId;
}
function getConversationId(req, res, options) {
    var cookieName = options.conversationIdCookieName;
    var headerName = options.conversationIdHeader;
    var conversationId = req.headers[headerName] || req.cookies && req.cookies[cookieName];
    if (!conversationId) {
        conversationId = uuid.v1();
    }
    req.conversationId = conversationId;
    res.cookie(cookieName, conversationId, { path: '/' });
    return conversationId;
}
function getConversationId ( req , res , options ) { var cookieName = options . conversationIdCookieName ; var headerName = options . conversationIdHeader ; var conversationId = req . headers [ headerName ] || req . cookies && req . cookies [ cookieName ] ; if ( ! conversationId ) { conversationId = uuid . v1 ( ) ; } req . conversationId = conversationId ; res . cookie ( cookieName , conversationId , { path : '/' } ) ; return conversationId ; }
Create a "conversation" identifier to track requests per browser session
Create a conversation identifier to track requests per browser session