- serveFile(dir)
- else if (fPaths.length == 0)
- serveFile(`${dir}/index.html`)
- else if (fPaths[0] !== '..' || path.normalize(`${dir}${path.sep}..`).includes(path.normalize(opts['bindings'][routeName]))) {
- let nextFPath = fPaths.shift()
- if (nextFPath in fPaths)
- followBind(`${dir}${path.sep}${nextFPath}`, fPaths)
- else {
- response.writeHead(404)
- response.end()
- }
- }
- else {
- console.log(`SEC: Ignored '..' in URL ${request.url}`)
- console.log(request)
- }