1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Files
docs/middleware/enterprise-homepage.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

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()
}