Update .gitignore and add new dependencies and routes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,7 +16,7 @@ require('./models/fileCreated.js');
|
||||
|
||||
let setup;
|
||||
try {
|
||||
setup = JSON.parse(fs.readFileSync('setup.json', 'utf8'));
|
||||
setup = JSON.parse(fs.readFileSync(path.join('/data', 'setup.json'), 'utf8'));
|
||||
} catch (err) {
|
||||
console.error('Error reading setup.json:', err);
|
||||
process.exit(1);
|
||||
@@ -32,7 +32,7 @@ if (setup.ldap !== undefined) {
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
app.get(['/user.json', '/file_info.json', '/setup.json'], (req, res) => {
|
||||
app.get(['/data/user.json', '/data/file_info.json', '/data/setup.json'], (req, res) => {
|
||||
res.status(403).send('Access Denied');
|
||||
});app.use(express.urlencoded({ extended: true }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user