Comparing version 1.1.1 to 1.1.2
@@ -19,3 +19,2 @@ "use strict"; | ||
head = /^(HEAD|OPTIONS)$/, | ||
space = /\s+/, | ||
methods = ["DELETE", "GET", "POST", "PUT", "PATCH"]; | ||
@@ -78,3 +77,3 @@ | ||
decorate (req, res) { | ||
let parsed = parse(this.url(req)), | ||
let parsed = parse(req), | ||
remotes = req.headers["x-forwarded-for"] ? req.headers["x-forwarded-for"].split(/\s*,\s*/g) : [req.connection.remoteAddress]; | ||
@@ -329,21 +328,4 @@ | ||
} | ||
url (req) { | ||
let header = req.headers.authorization || "", | ||
auth = "", | ||
token; | ||
if (!utility.isEmpty(header)) { | ||
token = header.split(space).pop() || ""; | ||
auth = new Buffer(token, "base64").toString(); | ||
if (!utility.isEmpty(auth)) { | ||
auth += "@"; | ||
} | ||
} | ||
return "http://" + auth + req.headers.host + req.url; | ||
} | ||
} | ||
module.exports = Woodland; |
{ | ||
"name": "woodland", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Lightweight HTTP/HTTPS router with virtual hosts", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
"tiny-lru": "~1.1.0", | ||
"tiny-parse": "^1.0.1" | ||
"tiny-parse": "~1.0.2" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
@@ -75,7 +75,4 @@ <img src="https://avoidwork.github.io/woodland/logo.svg" width="108" /> | ||
##### url (req) | ||
Constructs a full URL from `req`. | ||
## License | ||
Copyright (c) 2016 Jason Mulligan | ||
Licensed under the BSD-3 license. |
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
14576
303
78
Updatedtiny-parse@~1.0.2