mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
dont allow to cache error pages (#3962)
This commit is contained in:
parent
ccc9e7e174
commit
4061b6fd87
@ -21,6 +21,7 @@ export default function errorMiddleware(err, req, res, next) {
|
|||||||
res.statusMessage = err.name
|
res.statusMessage = err.name
|
||||||
res.setHeader('Content-Type', type + '; charset=utf-8')
|
res.setHeader('Content-Type', type + '; charset=utf-8')
|
||||||
res.setHeader('Content-Length', Buffer.byteLength(content))
|
res.setHeader('Content-Length', Buffer.byteLength(content))
|
||||||
|
res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate')
|
||||||
|
|
||||||
// Send Response
|
// Send Response
|
||||||
res.end(content, 'utf-8')
|
res.end(content, 'utf-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user