Skip to content

Commit 6fbc269

Browse files
committed
pref: remove unnecessary regexp for trust proxy
1 parent 2bc734a commit 6fbc269

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

History.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ unreleased
44
* deps: accepts@~1.3.8
55
- deps: mime-types@~2.1.34
66
- deps: negotiator@0.6.3
7+
* pref: remove unnecessary regexp for trust proxy
78

89
4.17.2 / 2021-12-16
910
===================

lib/utils.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ exports.compileTrust = function(val) {
228228

229229
if (typeof val === 'string') {
230230
// Support comma-separated values
231-
val = val.split(/ *, */);
231+
val = val.split(',')
232+
.map(function (v) { return v.trim() })
232233
}
233234

234235
return proxyaddr.compile(val || []);

0 commit comments

Comments
 (0)