Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
}
app.use(ResponseTime());
app.use(Conditional());
app.use(Etag());
// app.use(Morgan('combined'));
const koaBunyanLogger = require("koa-bunyan-logger");
app.use(koaBunyanLogger());
app.use(koaBunyanLogger.requestIdContext());
app.use(koaBunyanLogger.requestLogger());
app.use(helmet.frameguard());
app.use(helmet.xssFilter());
app.use(helmet.ieNoOpen());
app.use(Compress());
app.keys = config.cookieKeys;
// Signed-cookies session support
// app.use(session({
// maxage: null
// }, app));
app.use(BodyParser());
// turn errors into a JSON structure
app.use(async (ctx, next) => {
try {
await next();