IP Address missing from connection

this.connection.clientAddress works locally but not when deployed. Here is the connection when deployed.

      id: 'xJCmM62BJuydhKhtC',  
      close: [Function: close],  
      onClose: [Function: onClose],  
      clientAddress: null,  
        host: 'asdf.com',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36',
        httpHeaders: 'accept-language': 'en-US,en;q=0.9'

It’s missing the clientAddress and x-forwarded-for. How can I get the ip address? Is there some way to get it from node?

Some more info.

There are no proxies in front of the meteor app. The meteor app is listening on port 80. I tried setting HTTP_FORWARDED_COUNT to 1 and 0 but it didn’t change anything. The app is inside of a docker container.


Turned out that I needed to set rancher’s network to host and check “enable rancher dns service discovery”.