nl_tokens: inject any custom header values into a proxy request along with the x - forwarded - for x - forwarded - port and via headers
pl_tokens: function injectProxyHeaders ( req , rule ) { // the HTTP host header is often needed by the target webserver config req . <mask> [ 'host' ] = rule . target . host + ( rule . target . originalPort ? util . format ( ':%d' , rule . target . originalPort ) : '' ) ; // document that this request was proxied req . headers [ 'via' ] = util . format ( 'http://%s:%s' , req . connection . address ( ) . address , req . connection . address ( ) . port ) ; // inject any custom headers as configured config . headers . forEach ( function ( header ) { var value = header . value , name = header . name ; if ( typeof ( value ) === 'function' ) { value = value . call ( undefined , req ) ; } if ( typeof ( value ) !== 'string' ) { value = '' ; } if ( typeof ( name ) === 'string' ) { req . headers [ name . toLowerCase ( ) ] = value ; } } ) ; injectAuthHeader ( req ) ; }