RUM JS not collecting user agent location

Hi @marone,

Glad that worked! :smile:

when I did some research on google, found that they use Nginx and they set this header for incoming http request.

Bear in mind this description from MDN about X-Forwarded-For

"The X-Forwarded-For (XFF) header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or a load balancer. When traffic is intercepted between clients and servers, server access logs contain the IP address of the proxy or load balancer only. To see the original IP address of the client, the X-Forwarded-For request header is used."

You need to configure your environment to handle the scenario described above, you cannot do such logic from the client side. (excluding the local modification for testing that you made)

Apart from that, once you start having visitors you will start seeing their regions properly differentiated. Is the website already accessible over the internet?

Please, have a look at this link since might be helpful for you, too.

Thanks,
Alberto

1 Like