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'],
|
passwords: ['fartsex'],
|
||||||
url: 'http://localhost:3001',
|
url: 'http://localhost:3001',
|
||||||
|
rootRedirect: 'https://hippoz.xyz/',
|
||||||
storagePath: '/tmp/yes',
|
storagePath: '/tmp/yes',
|
||||||
fileTypes: fileTypes,
|
fileTypes: fileTypes,
|
||||||
files: {
|
files: {
|
||||||
|
|
8
index.js
8
index.js
|
@ -74,9 +74,11 @@ const corsOptions = {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
// res.render('upload');
|
if (!config.rootRedirect) {
|
||||||
// TODO: this is only for hippoz. remove the line below and uncomment the line above if you are not hippoz man
|
res.render('upload');
|
||||||
res.redirect(301, 'https://hippoz.xyz/');
|
} else {
|
||||||
|
res.redirect(301, config.rootRedirect);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/file/:filename', (req, res) => {
|
app.get('/file/:filename', (req, res) => {
|
||||||
|
|
Loading…
Reference in a new issue