Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

external.js 304 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
  1. const externalSites = require('../../lib/redirects/external-sites')
  2. // blanket redirects to external websites
  3. module.exports = async function externalRedirects (req, res, next) {
  4. if (req.path in externalSites) {
  5. return res.redirect(301, externalSites[req.path])
  6. } else {
  7. return next()
  8. }
  9. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...