Skip to content

Commit

Permalink
fix(http): properly respect ignoreCacheControl option
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 13, 2024
1 parent abfaa23 commit 96a8489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function ipxHttpStorage(_options: HTTPStorageOptions = {}): IPXStorage {
// eslint-disable-next-line unicorn/consistent-function-scoping
function parseResponse(response: Response) {
let maxAge = defaultMaxAge;
if (_options.ignoreCacheControl) {
if (_options.ignoreCacheControl !== true) {
const _cacheControl = response.headers.get("cache-control");
if (_cacheControl) {
const m = _cacheControl.match(/max-age=(\d+)/);
Expand Down

0 comments on commit 96a8489

Please sign in to comment.