зеркало из https://github.com/github/docs.git
Merge pull request #17989 from github/deprecated-redirect-bugfix
Archived GHES redirects followup
This commit is contained in:
Коммит
f8b2a6175a
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче