Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
serve only files (serving directory crashes node)
Browse files Browse the repository at this point in the history
  • Loading branch information
matjaz committed Oct 29, 2011
1 parent 224a081 commit 39093f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/debug-file-server.js
Expand Up @@ -32,6 +32,7 @@ function DebugFileServer(req, res) {
}
/* File must exist and must be located inside the fileServerBaseDir */
else if (path.existsSync(fullRequestedFilePath) &&
fs.statSync(fullRequestedFilePath).isFile() &&
fullRequestedFilePath.indexOf(fileServerBaseDir) === 0)
{
var rewriter;
Expand Down

0 comments on commit 39093f5

Please sign in to comment.