Renamed variable and added comment to config.js
This commit is contained in:
@@ -37,7 +37,8 @@ const config = {
|
||||
// see https://github.com/expressjs/morgan
|
||||
// set to false to disable logging
|
||||
"accessLog": ':date[iso] :method :url :status :response-time :remote-addr',
|
||||
"dynUpload": '/'
|
||||
//use to set custom upload url
|
||||
"uploadAppPath": '/'
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@ app.get('/robots.txt', (req, res) => {
|
||||
//
|
||||
//
|
||||
app.get('/', (req, res) => {
|
||||
if (config.dynUpload != '/')
|
||||
res.status(304).redirect(config.dynUpload);
|
||||
if (config.uploadAppPath != '/')
|
||||
res.status(304).redirect(config.uploadAppPath);
|
||||
else
|
||||
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'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user