mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Remove code that is no longer in use (#5147)
* Remove handleBuildId as it’s being handled in the static files route * Remove dead code
This commit is contained in:
parent
344d770a28
commit
c2a7766a05
|
@ -352,20 +352,6 @@ export default class Server {
|
|||
return buildId.trim()
|
||||
}
|
||||
|
||||
handleBuildId (buildId, res) {
|
||||
if (this.dev) {
|
||||
res.setHeader('Cache-Control', 'no-store, must-revalidate')
|
||||
return true
|
||||
}
|
||||
|
||||
if (buildId !== this.renderOpts.buildId) {
|
||||
return false
|
||||
}
|
||||
|
||||
res.setHeader('Cache-Control', 'public, max-age=31536000, immutable')
|
||||
return true
|
||||
}
|
||||
|
||||
async getCompilationError (page) {
|
||||
if (!this.hotReloader) return
|
||||
|
||||
|
@ -375,9 +361,4 @@ export default class Server {
|
|||
// Return the very first error we found.
|
||||
return errors[0]
|
||||
}
|
||||
|
||||
send404 (res) {
|
||||
res.statusCode = 404
|
||||
res.end('404 - Not Found')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue