* 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
12 lines
210 B
JavaScript
12 lines
210 B
JavaScript
const { FEATURE_NEXTJS } = process.env
|
|
|
|
module.exports = function isNextRequest (req, res, next) {
|
|
req.renderWithNextjs = false
|
|
|
|
if (FEATURE_NEXTJS) {
|
|
req.renderWithNextjs = true
|
|
}
|
|
|
|
return next()
|
|
}
|