bugfix: proper removal of X-Refer-To-Leave-Untouched on outgoing REFER

This commit is contained in:
Dave Horton
2022-12-01 12:36:49 -05:00
parent b2d48c8954
commit 3360ddb3e6
+2 -2
View File
@@ -779,7 +779,7 @@ Duration=${payload.duration} `
const u = parseUri(referredBy.uri);
const leaveReferToAlone = req.has('X-Refer-To-Leave-Untouched');
if (leaveReferToAlone) {
this.logger.debug(`passing Refer-To header through untouched: ${referTo}`);
this.logger.debug({referTo}, 'passing Refer-To header through untouched');
}
else {
const isDotDecimal = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(uri.host);
@@ -808,7 +808,7 @@ Duration=${payload.duration} `
// eslint-disable-next-line no-unused-vars
'content-length':contentlength, 'refer-to':_referto, 'referred-by':_referredby,
// eslint-disable-next-line no-unused-vars
'x-refer-to-leave-untouched': _leave,
'X-Refer-To-Leave-Untouched': _leave,
...customHeaders
} = req.headers;