make redirect a config option
This commit is contained in:
parent
d84220b2c2
commit
051f7326ec
2 changed files with 6 additions and 3 deletions
|
@ -11,6 +11,7 @@ module.exports = {
|
|||
},
|
||||
passwords: ['fartsex'],
|
||||
url: 'http://localhost:3001',
|
||||
rootRedirect: 'https://hippoz.xyz/',
|
||||
storagePath: '/tmp/yes',
|
||||
fileTypes: fileTypes,
|
||||
files: {
|
||||
|
|
8
index.js
8
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) => {
|
||||
|
|
Loading…
Reference in a new issue