1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Files
docs/middleware/set-fastly-cache-headers.js
Kevin Heis 8a56437c93 Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00

9 lines
253 B
JavaScript

export default function setFastlyCacheHeaders(req, res, next) {
// Disallow both Fastly AND the browser from caching HTML pages
res.set({
'surrogate-control': 'private, no-store',
'cache-control': 'private, no-store',
})
return next()
}