koajs / koajs/session

Add secure cookie flag to readme

Open
#164 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
908
Forks
115
PR merge metrics
No merged PRs in 30d

Description

I wanted to utilize Koa's [`secure`](https://koajs.com/#ctx-cookies-set-name-value-options-) so that generated cookies were only sent over HTTPS, but the readme was somewhat unclear whether this was supported.

It looks like all options given in the module's configuration are passed to Koa's `ctx.cookies.set` method, so setting this flag is already possible, but it would be helpful to add `secure` to the `CONFIG` example given in the readme.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Update the README's CONFIG example to include Koa's secure cookie option. Start with the existing CONFIG example and confirm the documentation makes clear that this option is passed through to ctx.cookies.set and restricts cookies to HTTPS.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.