From 6c340455f84bbfc5ca71482084cef6f00dc572da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Rodr=C3=ADguez=20Rodr=C3=ADguez?= Date: Thu, 29 Jan 2015 17:51:09 +0100 Subject: [PATCH] Change request's "ips" regex to match others. So I am in this silly quest of cloning the repo, deleting all the code on it and rewriting it again step by step to pass the tests. It is a acceptable way to learn how koa works. Anyway, I saw that the regex used in `ips` doesn't match the others on the file, so I thought it would be good to change it. --- lib/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request.js b/lib/request.js index 8e82398..29a9b64 100644 --- a/lib/request.js +++ b/lib/request.js @@ -381,7 +381,7 @@ module.exports = { var proxy = this.app.proxy; var val = this.get('X-Forwarded-For'); return proxy && val - ? val.split(/ *, */) + ? val.split(/\s*,\s*/) : []; },