1
0
mirror of synced 2025-12-26 05:02:55 -05:00
Files
docs/middleware/redirects/external.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
304 B
JavaScript

const externalSites = require('../../lib/redirects/external-sites')
// blanket redirects to external websites
module.exports = async function externalRedirects (req, res, next) {
if (req.path in externalSites) {
return res.redirect(301, externalSites[req.path])
} else {
return next()
}
}