Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
11 lines
379 B
JavaScript
11 lines
379 B
JavaScript
// This is a hack to prevent 'too many redirects' error in production
|
|
// TODO: figure out what's causing it and remove this hack.
|
|
|
|
const enterpriseServerReleases = require('../lib/enterprise-server-releases')
|
|
|
|
module.exports = (req, res, next) => {
|
|
return (req.path === '/enterprise')
|
|
? res.redirect(301, `/en/enterprise/${enterpriseServerReleases.latest}`)
|
|
: next()
|
|
}
|