Comparing version 0.5.3 to 0.5.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.4](https://github.com/nuxt-contrib/ipx/compare/v0.5.3...v0.5.4) (2021-02-04) | ||
### Bug Fixes | ||
* **http:** user headers.get ([9cf5aeb](https://github.com/nuxt-contrib/ipx/commit/9cf5aebaff8f8fe86014993ac4c91590bc5a6134)) | ||
### [0.5.3](https://github.com/nuxt-contrib/ipx/compare/v0.5.2...v0.5.3) (2021-02-04) | ||
@@ -7,0 +14,0 @@ |
@@ -101,4 +101,5 @@ #!/usr/bin/env node | ||
let maxAge = options.maxAge || 300; | ||
if (response.headers["cache-control"]) { | ||
const m = response.headers["cache-control"].match(/max-age=(\d+)/); | ||
const _cacheControl = response.headers.get("cache-control"); | ||
if (_cacheControl) { | ||
const m = _cacheControl.match(/max-age=(\d+)/); | ||
if (m && m[1]) { | ||
@@ -108,5 +109,6 @@ maxAge = parseInt(m[1]); | ||
} | ||
let mtime = new Date(); | ||
if (response.headers["last-modified"]) { | ||
mtime = new Date(response.headers["last-modified"]); | ||
let mtime; | ||
const _lastModified = response.headers.get("last-modified"); | ||
if (_lastModified) { | ||
mtime = new Date(_lastModified); | ||
} | ||
@@ -113,0 +115,0 @@ return { |
@@ -98,4 +98,5 @@ 'use strict'; | ||
let maxAge = options.maxAge || 300; | ||
if (response.headers["cache-control"]) { | ||
const m = response.headers["cache-control"].match(/max-age=(\d+)/); | ||
const _cacheControl = response.headers.get("cache-control"); | ||
if (_cacheControl) { | ||
const m = _cacheControl.match(/max-age=(\d+)/); | ||
if (m && m[1]) { | ||
@@ -105,5 +106,6 @@ maxAge = parseInt(m[1]); | ||
} | ||
let mtime = new Date(); | ||
if (response.headers["last-modified"]) { | ||
mtime = new Date(response.headers["last-modified"]); | ||
let mtime; | ||
const _lastModified = response.headers.get("last-modified"); | ||
if (_lastModified) { | ||
mtime = new Date(_lastModified); | ||
} | ||
@@ -110,0 +112,0 @@ return { |
{ | ||
"name": "ipx", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"repository": "nuxt-contrib/ipx", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
39320
1033