From f6252a67594071ca9a95d5da0ddf87d35aae61be Mon Sep 17 00:00:00 2001 From: Jonas Schmedtmann Date: Fri, 14 Jun 2019 16:52:42 +0100 Subject: [PATCH] Fixed minor bug --- 4-natours/after-section-14/controllers/authController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-natours/after-section-14/controllers/authController.js b/4-natours/after-section-14/controllers/authController.js index 54854ce..f5f89f3 100644 --- a/4-natours/after-section-14/controllers/authController.js +++ b/4-natours/after-section-14/controllers/authController.js @@ -20,7 +20,7 @@ const createSendToken = (user, statusCode, req, res) => { Date.now() + process.env.JWT_COOKIE_EXPIRES_IN * 24 * 60 * 60 * 1000 ), httpOnly: true, - secure: req.secure || req.headers('x-forwarded-proto') === 'https' + secure: req.secure || req.headers['x-forwarded-proto'] === 'https' }); // Remove password from output