Renamed variable and added comment to config.js

This commit is contained in:
root
2018-12-07 09:27:04 +01:00
parent 069ae356b4
commit c0abcbfc80
2 changed files with 5 additions and 4 deletions

View File

@@ -37,7 +37,8 @@ const config = {
// see https://github.com/expressjs/morgan // see https://github.com/expressjs/morgan
// set to false to disable logging // set to false to disable logging
"accessLog": ':date[iso] :method :url :status :response-time :remote-addr', "accessLog": ':date[iso] :method :url :status :response-time :remote-addr',
"dynUpload": '/' //use to set custom upload url
"uploadAppPath": '/'
}; };

View File

@@ -44,13 +44,13 @@ app.get('/robots.txt', (req, res) => {
// //
// //
app.get('/', (req, res) => { app.get('/', (req, res) => {
if (config.dynUpload != '/') if (config.uploadAppPath != '/')
res.status(304).redirect(config.dynUpload); res.status(304).redirect(config.uploadAppPath);
else else
res.sendFile(path.join(__dirname, '../public/html/upload.html')); res.sendFile(path.join(__dirname, '../public/html/upload.html'));
}); });
app.get(config.dynUpload, (req, res) => { app.get(config.uploadAppPath, (req, res) => {
res.sendFile(path.join(__dirname, '../public/html/upload.html')); res.sendFile(path.join(__dirname, '../public/html/upload.html'));
}); });