Add the domain parameter to config
Hi,
It would be very convenient for me if koa-session supported the domain directive in it's config.
I'm happy to implement and PR if neccessary.
Hi, It would be very convenient for me if koa-session supported the
domaindirective in it's config. I'm happy to implement and PR if neccessary.
Hi,
I had to use the domain directive too, so I dug up the code, and since all config params get passed down to "lower layers", I tried to add a domain key to the config object, and it worked! :)
Hi,
I had to use the domain directive too, so I dug up the code, and since all config params get passed down to "lower layers", I tried to add a domain key to the config object, and it worked! :)
Huh, that's interesting. I couldn't get it to work for me, although other parameters that are listed in the readme seemed to work (signed, httpOnly etc). Maybe I had something else wrong in my configuration.
see https://github.com/koajs/session#options
All other options are passed to ctx.cookies.get() and ctx.cookies.set() allowing you to control security, domain, path, and signing among other settings.
the problem is, for typescript users, that interface opts does not allow to add other options.
koa-session didn't provide typescript definition, maybe you can create a pull request to the tsd which you are using?
Yes, forgot to mention that this is an issue with @types/koa-session and not with this library.