egg-cookies
Advanced tools
Comparing version 2.3.4 to 2.4.0
2.4.0 / 2020-06-22 | ||
================== | ||
**features** | ||
* [[`4417dda`](http://github.com/eggjs/egg-cookies/commit/4417ddacecde2dff3792ca10e0bf05fc94a991ee)] - feat: Send `max-age` header as well as `expires` if it is set(#27) (Junyan <<yancoding@gmail.com>>) | ||
2.3.4 / 2020-06-12 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -47,4 +47,7 @@ 'use strict'; | ||
const attrs = this.attrs; | ||
if (attrs.maxAge) attrs.expires = new Date(Date.now() + attrs.maxAge); | ||
if (attrs.path) header += '; path=' + attrs.path; | ||
if (attrs.maxAge) { | ||
header += '; max-age=' + Math.round(attrs.maxAge / 1000); | ||
attrs.expires = new Date(Date.now() + attrs.maxAge); | ||
} | ||
if (attrs.expires) header += '; expires=' + attrs.expires.toUTCString(); | ||
@@ -51,0 +54,0 @@ if (attrs.domain) header += '; domain=' + attrs.domain; |
{ | ||
"name": "egg-cookies", | ||
"version": "2.3.4", | ||
"version": "2.4.0", | ||
"description": "cookies module for egg", | ||
@@ -5,0 +5,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
23537
372
0