1
0
mirror of synced 2025-12-22 19:34:15 -05:00

Try to prevent late/duplicate response errors (#20077)

* Ensure all Express 'next' calls include 'return's

* Add headersSent checks during archived versions flow

* Return a 404 earlier if archived resource fetch fails

* Short-circuit responses for archived stuff

* Be more careful about responding to and short-circuiting after search requests

* Fix tests
This commit is contained in:
James M. Greene
2021-06-28 14:31:54 -05:00
committed by GitHub
parent 930b266572
commit 2dbae93c53
8 changed files with 39 additions and 33 deletions

View File

@@ -15,5 +15,5 @@ module.exports = async function handleNextDataPath (req, res, next) {
req.pagePath = req.path
}
next()
return next()
}