This commit is contained in:
Kevin Heis 2024-11-05 13:37:23 -08:00
Родитель 629632fc80
Коммит 5e41ff1d22
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -33,6 +33,8 @@ const OLD_DEVELOPER_SITE_CONTAINER = `${OLD_PUBLIC_AZURE_BLOB_URL}/developer-sit
// version. E.g. https://github.github.com/docs-ghes-2.10
const ENTERPRISE_GH_PAGES_URL_PREFIX = 'https://github.github.com/docs-ghes-'
const inProd = process.env.NODE_ENV === 'production' // temporary
type ArchivedRedirects = {
[url: string]: string | null
}
@ -234,7 +236,7 @@ export default async function archivedEnterpriseVersions(
)
.replaceAll(
`${OLD_AZURE_BLOB_ENTERPRISE_DIR}/${requestedVersion}/`,
`${req.protocol}://${req.get('host')}/enterprise-server@${requestedVersion}/`,
`${req.protocol}://${inProd ? 'docs.github.com' : req.get('host')}/enterprise-server@${requestedVersion}/`,
)
}