elad / node-cluster-socket.io

Writeup on how to make node.js cluster and socket.io play nice
421 stars 63 forks source link

how to get original client ip while using Haproxy #20

Open somaranaresh opened 8 years ago

somaranaresh commented 8 years ago

Hi elad, I'm using haproxy as a reverse-proxy, I'm getting haproxy ip as client ip at 'connection.remoteAddress'.In my use case clients will connect via haproxy and using node-cluster-socket.io for sticky-session. If i use haproxy x-forwarded-host now how do i get original client ip from node-cluster-socket.io

davidolen commented 7 years ago

@somaranaresh I just added a comment on issue #9, which is probably related with the issue you have raised. Still waiting for Elad's response. :-) At the same time, you may take a look at issue #7 and #15, which may be helpful.