Socket
Socket
Sign inDemoInstall

egg-cookies

Package Overview
Dependencies
17
Maintainers
5
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.4 to 2.4.0

6

History.md
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 @@ ==================

5

lib/cookie.js

@@ -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;

2

package.json
{
"name": "egg-cookies",
"version": "2.3.4",
"version": "2.4.0",
"description": "cookies module for egg",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc