1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-11 21:29:08 +09:00

Disable secure cookie

This commit is contained in:
syuilo 2018-10-17 05:54:31 +09:00
parent 22015044a5
commit d2e0faa533
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -8,7 +8,9 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
ctx.cookies.set('i', user.token, { ctx.cookies.set('i', user.token, {
path: '/', path: '/',
domain: config.hostname, domain: config.hostname,
secure: config.url.startsWith('https'), // SEE: https://github.com/koajs/koa/issues/974
//secure: config.url.startsWith('https'),
secure: false,
httpOnly: false, httpOnly: false,
expires: new Date(Date.now() + expires), expires: new Date(Date.now() + expires),
maxAge: expires maxAge: expires