Since 2014, RFC7239 has standardized the Forwarded: header which allows chaining of multiple forwards in a more extensible way.
An example of this header being set when the origin request passes through only one reverse proxy might look like
Forwarded: for=12.34.56.78;host=example.com;proto=https
As far as I can tell (from proxy-addr docs, and also attempting to use express-session with this header and app.set('trust proxy', 'loopback'), this is being ignored by proxy-addr and therefore causing the Forwarded: header to be unsupported by upstream middleware such as express-session which relies on things being set in the request by proxy-addr.
Since 2014, RFC7239 has standardized the
Forwarded:header which allows chaining of multiple forwards in a more extensible way.An example of this header being set when the origin request passes through only one reverse proxy might look like
As far as I can tell (from
proxy-addrdocs, and also attempting to useexpress-sessionwith this header andapp.set('trust proxy', 'loopback'), this is being ignored byproxy-addrand therefore causing theForwarded:header to be unsupported by upstream middleware such asexpress-sessionwhich relies on things being set in the request byproxy-addr.