pref: remove unnecessary regexp for trust proxy

This commit is contained in:
Douglas Christopher Wilson
2022-02-04 16:34:56 -05:00
parent 2bc734aa3f
commit 6fbc269563
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ unreleased
* deps: accepts@~1.3.8
- deps: mime-types@~2.1.34
- deps: negotiator@0.6.3
* pref: remove unnecessary regexp for trust proxy
4.17.2 / 2021-12-16
===================

View File

@@ -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 || []);