fix cache header with 0 age
This commit is contained in:
parent
d666716140
commit
340fbfff4b
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ router.get('/:configuration/:resource/:type/:id/:extra?.json', (req, res, next)
|
|||
staleError: 'stale-if-error'
|
||||
};
|
||||
const cacheControl = Object.keys(cacheHeaders)
|
||||
.map(prop => resp[prop] && cacheHeaders[prop] + '=' + resp[prop])
|
||||
.map(prop => Number.isInteger(resp[prop]) && cacheHeaders[prop] + '=' + resp[prop])
|
||||
.filter(val => !!val).join(', ');
|
||||
|
||||
res.setHeader('Cache-Control', `${cacheControl}, public`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue