This topic describes how to obtain real IP addresses of clients by using Layer 7 listeners of the Server Load Balancer (SLB) service.
Background information
For Layer 7 listeners (HTTP or HTTPS listeners), you must first configure application
servers. Then, you can obtain real IP addresses of clients from the
X-Forwarded-For
header. Real client IP addresses are in the X-Forwarded-For fields of HTTP header
in the following format: X-Forwarded-For: IP address of the client, IP address of Proxy Server 1, IP address of Proxy Server 2,...
When you obtain the real IP address of a client from the X-Forwarded-For header, the first IP address that you obtain is the real IP address.
Note For the HTTPS listener, SSL certificates are configured in the frontend, and the backend
still uses the HTTP protocol. Therefore, the configurations on application servers
for HTTPS listeners are the same as HTTP listeners.