don't record temporary redirects (#25668)
This commit is contained in:
@@ -5,8 +5,8 @@ export default function recordRedirects(req, res, next) {
|
||||
if (!req.hydro.maySend()) return next()
|
||||
|
||||
res.on('finish', async function recordRedirect() {
|
||||
// We definitely don't want 304
|
||||
if (![301, 302, 303, 307, 308].includes(res.statusCode)) return
|
||||
// Basically only the "permanent" ones
|
||||
if (![301, 308].includes(res.statusCode)) return
|
||||
const schemaName = hydroNames.redirect
|
||||
const redirectEvent = {
|
||||
context: {
|
||||
|
||||
Reference in New Issue
Block a user