Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed "gzippo.staticGzip should redirect on directories"

  • Loading branch information...
commit feeef9badf0bf131339e088e441af097598a322e 1 parent 10d1817
@underbluewaters authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/staticGzip.js
View
6 lib/staticGzip.js
@@ -216,13 +216,13 @@ exports = module.exports = function staticGzip(dirPath, options){
return next();
}
+ // Check if file exists before passing uncompressed to client
+ if (!method) return pass(filename);
+
if (stat.isDirectory()) {
return next();
}
- // Check if file exists before passing uncompressed to client
- if (!method) return pass(filename);
-
if (!contentTypeMatch.test(contentType)) {
return pass(filename);
}
Please sign in to comment.
Something went wrong with that request. Please try again.