src/IncomingMessage.js
function createConnectionObject(context) {
  const { req } = context.bindings;
  const xForwardedFor = req.headers ? req.headers["x-forwarded-for"] : undefined;

  return {
    encrypted     : req.originalUrl && req.originalUrl.toLowerCase().startsWith("https"),
    remoteAddress : removePortFromAddress(xForwardedFor)
  };
}
function createConnectionObject(context) {
  const { req } = context.bindings;
  const xForwardedFor = req.headers ? req.headers["x-forwarded-for"] : undefined;

  return {
    encrypted     : req.originalUrl && req.originalUrl.toLowerCase().startsWith("https"),
    remoteAddress : removePortFromAddress(xForwardedFor)
  };
}
function createConnectionObject ( context ) { const { req } = context . bindings ; const xForwardedFor = req . headers ? req . headers [ "x-forwarded-for" ] : undefined ; return { encrypted : req . originalUrl && req . originalUrl . toLowerCase ( ) . startsWith ( "https" ) , remoteAddress : removePortFromAddress ( xForwardedFor ) } ; }
Create a fake connection object

@param {Object} context Raw Azure context object for a single HTTP request
@returns {object} Connection object
Create a fake connection object