Stock Price Checker - Only 1 like per IP

I see most of the solutions using the first IP address in the X-forwarded-for header to verify if user has liked or not. But from what I understand, the first IP address ( in , <proxy 1>, <proxy 2>) is not a particular client (browser) in a local network. For example, 2 users using the same local network have the same part (because is not a private IP address) so the 2 only add 1 like if both like the same stock.
Please help me clarify this understanding. Thanks!

1 Like

Hey mate @OtterB8, I struggled with the same questioning in the beginning but from my point of view, it all comes down to this: no matter how many computer/tablet/mobile you have connected to you local network (LAN, be it wired ethernet, wifi etc…), you will probably have only one router serving as your gateway to the internet. And that’s your only valid IP address in the internet, your router’s external IP, which can be retrieved, as you mentioned before, through (req.headers['x-forwarded-for'] + "").split(",")[0].