diff --git a/config.js b/config.js index 624a9a3..b30176f 100644 --- a/config.js +++ b/config.js @@ -11,6 +11,7 @@ module.exports = { }, passwords: ['fartsex'], url: 'http://localhost:3001', + rootRedirect: 'https://hippoz.xyz/', storagePath: '/tmp/yes', fileTypes: fileTypes, files: { diff --git a/index.js b/index.js index 7f2eb99..4c3a766 100644 --- a/index.js +++ b/index.js @@ -74,9 +74,11 @@ const corsOptions = { } app.get('/', (req, res) => { - // res.render('upload'); - // TODO: this is only for hippoz. remove the line below and uncomment the line above if you are not hippoz man - res.redirect(301, 'https://hippoz.xyz/'); + if (!config.rootRedirect) { + res.render('upload'); + } else { + res.redirect(301, config.rootRedirect); + } }); app.get('/file/:filename', (req, res) => {