From aaaff7f8580e09846578151e0e10888dca2bb96d Mon Sep 17 00:00:00 2001 From: Eva Rosalene <10000537+Eva-Rosalene@users.noreply.github.com> Date: Tue, 27 Oct 2020 16:15:04 +0300 Subject: [PATCH] Send Max-Age header too if Max-Age is given --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 3dd6728..8876e97 100644 --- a/index.js +++ b/index.js @@ -170,6 +170,7 @@ Cookie.prototype.toHeader = function() { if (this.path ) header += "; path=" + this.path if (this.expires ) header += "; expires=" + this.expires.toUTCString() + if (this.maxAge ) header += "; max-age=" + this.maxAge / 1000 if (this.domain ) header += "; domain=" + this.domain if (this.sameSite ) header += "; samesite=" + (this.sameSite === true ? 'strict' : this.sameSite.toLowerCase()) if (this.secure ) header += "; secure"