If a Web application server (ex. nginx&php-fpm) is behind Load-Balancer such as AWS-ELB:
Client -> Load-Balancer -> Web Application server
To get the real client IP from Web application has two way to implement for me:
Handle the forward IP on Web server like setting nginx real IP module.
Handle the forward IP on Web application like changing to get IP by forward header from trust Proxy.
Which way is better over all? or is there has other better ways?
Thanks.