Load Balancer

The Load Balancer should be configured to send X-Forwarded-For (originating IP address) and X-Forwarded-Proto (originating prototype). The application server (e.g. Tomcat, etc) uses these to understand the intended context for the request. If the proto is https, the application server will configure the servlet context to be secure so that the application itself simply things it was an https request.

The X-Forwarded-For (XFF) HTTP header field is a common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer.

The X-Forwarded-Proto (XFP) header is a de-facto standard header for identifying the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer.