mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
fix(vue-renderer): prevent can't set headers after they are sent (#5863)
This commit is contained in:
parent
0c3b9c5d12
commit
31f5729828
@ -110,11 +110,10 @@ export default class ModernRenderer extends SSRRenderer {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async render(renderContext) {
|
render(renderContext) {
|
||||||
const result = await super.render(renderContext)
|
|
||||||
if (this.isServerMode) {
|
if (this.isServerMode) {
|
||||||
renderContext.res.setHeader('Vary', 'User-Agent')
|
renderContext.res.setHeader('Vary', 'User-Agent')
|
||||||
}
|
}
|
||||||
return result
|
return super.render(renderContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user