Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "expired", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Calculate when HTTP responses expire from the cache headers", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -20,13 +20,12 @@ # expired | ||
const headers = { | ||
'access-control-allow-origin': '*', | ||
'age': '0', | ||
'cache-control': 'public, max-age=300', | ||
'content-encoding': 'gzip', | ||
'content-type': 'application/json;charset=utf-8', | ||
'date': 'Fri, 23 Dec 2016 05:50:31 GMT', | ||
'last-modified': 'Fri, 23 Dec 2016 05:23:23 GMT', | ||
'vary': 'Accept-Encoding, User-Agent', | ||
'via': '1.1 varnish-v4' | ||
}; | ||
const headers = ` | ||
Access-Control-Allow-Origin: * | ||
Age: 0 | ||
Cache-Control: public, max-age=300 | ||
Content-Encoding: gzip | ||
Content-Type: application/json;charset=utf-8 | ||
Date: Fri, 23 Dec 2016 05:50:31 GMT | ||
Last-Modified: Fri, 23 Dec 2016 05:23:23 GMT | ||
Vary: Accept-Encoding, User-Agent | ||
Via: 1.1 varnish-v4`; | ||
@@ -56,3 +55,3 @@ expired(headers) | ||
You can also pass headers in as raw text: | ||
Response headers are parsed into an object by many HTTP modules. `expired` will also accept a parsed header object: | ||
@@ -62,12 +61,13 @@ ```js | ||
const headers = ` | ||
Access-Control-Allow-Origin: * | ||
Age: 0 | ||
Cache-Control: public, max-age=300 | ||
Content-Encoding: gzip | ||
Content-Type: application/json;charset=utf-8 | ||
Date: Fri, 23 Dec 2016 05:50:31 GMT | ||
Last-Modified: Fri, 23 Dec 2016 05:23:23 GMT | ||
Vary: Accept-Encoding, User-Agent | ||
Via: 1.1 varnish-v4`; | ||
const headers = { | ||
'access-control-allow-origin': '*', | ||
'age': '0', | ||
'cache-control': 'public, max-age=300', | ||
'content-encoding': 'gzip', | ||
'content-type': 'application/json;charset=utf-8', | ||
'date': 'Fri, 23 Dec 2016 05:50:31 GMT', | ||
'last-modified': 'Fri, 23 Dec 2016 05:23:23 GMT', | ||
'vary': 'Accept-Encoding, User-Agent', | ||
'via': '1.1 varnish-v4' | ||
}; | ||
@@ -74,0 +74,0 @@ expired(headers) |
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
11357