Skip to content

Commit

Permalink
Fixing assignment in decorate()
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Oct 22, 2019
1 parent 923d558 commit ca267ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Woodland extends EventEmitter {
req.corsHost = "origin" in req.headers && req.headers.origin.replace(/^http(s)?:\/\//, "") !== req.headers.host;
req.cors = req.corsHost && (this.origins.includes(all) || this.origins.includes(req.headers.origin));
req.host = parsed.hostname;
req.ip = "x-forwarded-for" in req.headers ? req.headers["x-forwarded-for"].split(",").pop().trim() : "127.0.0.1"; //req.connection.remoteAddress;
req.ip = "x-forwarded-for" in req.headers ? req.headers["x-forwarded-for"].split(",").pop().trim() : req.connection.remoteAddress;
req.params = {};

res.error = (status = 500, body, headers = {"cache-control": "no-cache"}) => {
Expand Down

0 comments on commit ca267ae

Please sign in to comment.