Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as Koa from "koa";
import {MemoryStore, Session} from "koa-generic-session";
import session = require("koa-generic-session");
const app = new Koa();
app.use(session({
key: 'sessionKey',
store: MemoryStore(),
ttl: 60 * 60,
prefix: 'a-prefix',
cookie: {
path: '/test',
rewrite: false,
signed: false,
maxAge: 60 * 60,
secure: true,
httpOnly: true,
},
allowEmpty: false,
defer: false,
reconnectTimeout: 100,
rolling: false,
sessionIdStore: {
get: () => 'something',