From 0109e0811c4142153ae3f915295e62630653909e Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Mon, 26 Mar 2018 13:21:41 +0900 Subject: Specify Cookie domain with hostname --- src/api/common/signin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api') diff --git a/src/api/common/signin.ts b/src/api/common/signin.ts index 693e62f39f..ec3dd80309 100644 --- a/src/api/common/signin.ts +++ b/src/api/common/signin.ts @@ -4,7 +4,7 @@ export default function(res, user, redirect: boolean) { const expires = 1000 * 60 * 60 * 24 * 365; // One Year res.cookie('i', user.token, { path: '/', - domain: `.${config.host}`, + domain: `.${config.hostname}`, secure: config.url.substr(0, 5) === 'https', httpOnly: false, expires: new Date(Date.now() + expires), -- cgit v1.2.3-freya