websocket not sending x-forwarded-for header

The problem was with websocket only. The req.connection.socket was always null and x-forwarded-for was never sent.