Skip to content

Commit

Permalink
Merge pull request #17989 from github/deprecated-redirect-bugfix
Browse files Browse the repository at this point in the history
Archived GHES redirects followup
  • Loading branch information
sarahs authored Feb 24, 2021
2 parents ecc5d01 + f1336fd commit f8b2a61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion middleware/archived-enterprise-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8b2a61

Please sign in to comment.