diff --git a/middleware/archived-enterprise-versions.js b/middleware/archived-enterprise-versions.js index 48f497dbf37b..422484f977e0 100644 --- a/middleware/archived-enterprise-versions.js +++ b/middleware/archived-enterprise-versions.js @@ -38,7 +38,8 @@ module.exports = async (req, res, next) => { let isRedirect = false if (versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutArchivedRedirectsFile}`)) { try { - const redirectJson = await got(getProxyPath('redirects.json', requestedVersion)) + const res = await got(getProxyPath('redirects.json', requestedVersion)) + const redirectJson = JSON.parse(res.body) if (redirectJson[req.path]) { isRedirect = true