mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-10-04 02:04:22 +00:00
bugfix: proper removal of X-Refer-To-Leave-Untouched on outgoing REFER
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user