On the server side, this.connection.clientAddress occasionally returns 127.0.0.1 for some users at random, even though my server is not behind any proxy or load balancer

On the server side, this.connection.clientAddress occasionally returns 127.0.0.1 for some users at random, even though my server is not behind any proxy or load balancer. This behavior is inconsistent and I haven’t been able to identify the root cause or find any reliable solution to fix it yet. Any real solution ?

1 Like

Do you have an small poc that reproduces it?
what is your host provider?

We don’t have clear reproduction steps, as the issue occurs very rarely. However, we update the IP address each time a user logs in using the following code. We use galaxy cloud for hosting.

Meteor.users.update(
            { _id: user._id, },
            {
              $set: {
              ipAddress: this.connection.clientAddress,
              },
            }
          );