mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-07-04 19:11:47 +00:00
add support for proxies that add X-Forwarded-For
This commit is contained in:
+2
-2
@@ -75,8 +75,8 @@ module.exports = function(srf, logger) {
|
||||
req.locals = req.locals || {};
|
||||
|
||||
/* check if forwarded by a proxy that applied an X-Forwarded-For Header */
|
||||
if (req.has('X-Subspace-Forwarded-For')) {
|
||||
const original_source_address = req.get('X-Subspace-Forwarded-For');
|
||||
if (req.has('X-Forwarded-For') || req.has('X-Subspace-Forwarded-For')) {
|
||||
const original_source_address = req.get('X-Forwarded-For') || req.get('X-Subspace-Forwarded-For');
|
||||
logger.info({
|
||||
callId: req.get('Call-ID'),
|
||||
original_source_address,
|
||||
|
||||
Reference in New Issue
Block a user