title: res.cookie is undefined when server uses HTTPS
body: <p>I'm using a user login logic that saves JWT in cookies.</p>
  <pre><code>const token = jwt.sign({
    username: login,
  },
    process.env.JWT_SECRET);
  
  res.cookie(&quot;jwt&quot;, token, {
    secure: false,
    httpOnly: true,
  });
  console.log(res)
  return res.status(200).json({
    success: true,
    username: login });
  </code></pre>
  <p>The frontend making requests runs oh HTTP. When the server runs also on HTTP, everything works fine, but when I go for HTTPS, the cookie is not saved at all. Setting 'secure' to true does not help. What can be the possible reason?</p>