You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> You should probably be using this in combination with [koa-404-handler][] too!
48
48
49
+
The package exports a function which accepts four arguments (in order):
50
+
51
+
*`cookiesKey` - defaults to `false`
52
+
*`logger` - defaults to `console`
53
+
*`useCtxLogger` - defaults to `true`
54
+
*`stringify` - defaults to `fast-safe-stringify` (you can also use `JSON.stringify` or another option here if preferred)
55
+
56
+
If you pass a `cookiesKey` then support for sessions will be added. You should always set this argument's value if you are using cookies and sessions (e.g. web server).
57
+
58
+
We recommend to use [Cabin][] for your `logger` and also you should use its middleware too, as it will auto-populate `ctx.logger` for you to make context-based logs easy.
59
+
60
+
Note that this package only supports `koa-generic-session`, and does not yet support `koa-session-store` (see the code in [index.js](index.js) for more insight, pull requests are welcome).
61
+
49
62
### API
50
63
51
64
> No support for sessions, cookies, or flash messaging:
0 commit comments