Comparing version 1.4.0 to 1.5.0
@@ -51,3 +51,18 @@ var Fs = require('fs'); | ||
return this.handle.bind(this); | ||
var _handle = function (req, res, next) { | ||
var url = Url.parse(req.url).pathname; | ||
if (self.urlsMap.hasOwnProperty(url)) { | ||
return Send(req, self.urlsMap[url].path, self.options.sendOptions).pipe(res); | ||
} | ||
return next(); | ||
}; | ||
_handle.getHashedUrl = self.getHashedUrl.bind(self); | ||
_handle.getNaturalUrl = self.getNaturalUrl.bind(self); | ||
return _handle; | ||
}; | ||
@@ -98,15 +113,1 @@ | ||
}; | ||
// The middleware function used by express - serves the files | ||
internals.Box.prototype.handle = function (req, res, next) { | ||
var url = Url.parse(req.url).pathname; | ||
if (this.urlsMap.hasOwnProperty(url)) { | ||
return Send(req, this.urlsMap[url].path, this.options.sendOptions).pipe(res); | ||
} | ||
return next(); | ||
}; |
{ | ||
"name": "bomb", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "A frontend cache-busting static middleware for express", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
7585
85