Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Redirect
if (page.redirect) {
result.push('D');
result.push(page.redirect);
process.send(result.join(''));
return;
}
// Using service name by default
if (!page.state.Window.title) {
page.state.Window.title = settings.general.service.name;
}
// Rendering page
consolidate.pug('views/index.pug', {
cache: true,
title: page.state.Window.title,
content: page.content,
window: page.state.Window,
state: JSON.stringify(page.state)
}, function(err, html) {
result.push('C');
result.push(html);
process.send(result.join(''));
});
});