From d2e0faa533b7dba06b9a80a8a68bc8a4236ce569 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 Oct 2018 05:54:31 +0900 Subject: [PATCH] Disable secure cookie --- src/server/api/common/signin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server/api/common/signin.ts b/src/server/api/common/signin.ts index 44e1336f2..8d44b377f 100644 --- a/src/server/api/common/signin.ts +++ b/src/server/api/common/signin.ts @@ -8,7 +8,9 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { ctx.cookies.set('i', user.token, { path: '/', 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, expires: new Date(Date.now() + expires), maxAge: expires