Skip to content

Commit

Permalink
pref: remove unnecessary regexp for trust proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Feb 4, 2022
1 parent 2bc734a commit 6fbc269
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ unreleased
* deps: accepts@~1.3.8
- deps: mime-types@~2.1.34
- deps: [email protected]
* pref: remove unnecessary regexp for trust proxy

4.17.2 / 2021-12-16
===================
Expand Down
3 changes: 2 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ exports.compileTrust = function(val) {

if (typeof val === 'string') {
// Support comma-separated values
val = val.split(/ *, */);
val = val.split(',')
.map(function (v) { return v.trim() })
}

return proxyaddr.compile(val || []);
Expand Down

0 comments on commit 6fbc269

Please sign in to comment.