Comparing version 1.6.6 to 1.7.0
@@ -55,3 +55,3 @@ | ||
return Q.when(fs.canonical(path), function (canonical) { | ||
if (!fs.contains(root, canonical)) | ||
if (!fs.contains(root, canonical) && !options.followInsecureSymlinks) | ||
return options.notFound(request, response); | ||
@@ -66,3 +66,3 @@ if (path !== canonical && options.redirectSymbolicLinks) | ||
} else if (stat.isDirectory()) { | ||
return options.directory(request, canonical, options.contentType); | ||
return options.directory(request, canonical, options.contentType, fs); | ||
} else { | ||
@@ -69,0 +69,0 @@ return options.notFound(request, response); |
{ | ||
"name": "q-io", | ||
"version": "1.6.6", | ||
"version": "1.7.0", | ||
"description": "IO using Q promises", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/kriskowal/q-io/", |
@@ -724,2 +724,21 @@ | ||
Options include: | ||
- `notFound(request, response)`: alternate 404 responder, defaults to | ||
`HttpApps.notFound` | ||
- `file(request, path, contentType, fs)`: alternate file responder, | ||
defaults to `HttpApps.file` | ||
- `contentType`: forces the content type of file requests, forwarded | ||
to the `file` handler. | ||
- `directory(request, path, contentType, fs)`: alternate directory | ||
responder, defaults to `HttpApps.directory`. | ||
- `redirectSymbolicLinks`: directs the client to use a redirect | ||
response for symbolic links instead of following links internally. | ||
- `permanent`: symbolic links that are turned into HTTP redirects will | ||
be permanent. | ||
- `followInsecureSymbolicLinks`: directs `FileTree` to serve files | ||
that are outside the root path of the file tree if a symbolic link | ||
traverses there. | ||
- `fs`: alternate file system, defaults to the `fs` module. | ||
### Redirect(path) : Application | ||
@@ -726,0 +745,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2961667
924