mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
User ID logging even on exceptions, more detailed feedback logging/saving, stuff module fix, login screen description on feedback change
This commit is contained in:
parent
d590574712
commit
658840bd84
5 changed files with 22 additions and 14 deletions
|
@ -39,7 +39,7 @@ function GetApp () {
|
|||
}
|
||||
|
||||
// files in public dirs
|
||||
const listedFiles = p + 'files'
|
||||
const listedFiles = './' + p + 'files'
|
||||
|
||||
app.set('view engine', 'ejs')
|
||||
app.set('views', [
|
||||
|
@ -76,7 +76,7 @@ function GetApp () {
|
|||
fp.pop()
|
||||
fp = fp.join('/')
|
||||
}
|
||||
const fpath = './public/files' + fp
|
||||
const fpath = listedFiles + fp
|
||||
if (!fs.existsSync(fpath)) {
|
||||
res.render('nofile', {
|
||||
missingFile: fpath,
|
||||
|
@ -151,7 +151,7 @@ function GetApp () {
|
|||
app.get('/*', function (req, res) {
|
||||
let parsedUrl = decodeURI(req.url)
|
||||
let curr = listedFiles + '/' + parsedUrl.substring('/'.length, parsedUrl.length).split('?')[0]
|
||||
let relPath = curr.substring('./public/files'.length, curr.length)
|
||||
let relPath = curr.substring(listedFiles.length, curr.length)
|
||||
|
||||
if (relPath[relPath.length - 1] !== '/') { relPath += '/' }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue