diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-17 05:54:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-17 05:54:31 +0900 |
| commit | d2e0faa533b7dba06b9a80a8a68bc8a4236ce569 (patch) | |
| tree | be5bae4fc03d9b94468e8294c305c1c66629581b | |
| parent | 10.22.0 (diff) | |
| download | sharkey-d2e0faa533b7dba06b9a80a8a68bc8a4236ce569.tar.gz sharkey-d2e0faa533b7dba06b9a80a8a68bc8a4236ce569.tar.bz2 sharkey-d2e0faa533b7dba06b9a80a8a68bc8a4236ce569.zip | |
Disable secure cookie
| -rw-r--r-- | src/server/api/common/signin.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/api/common/signin.ts b/src/server/api/common/signin.ts index 44e1336f27..8d44b377fe 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 |