Using CloudFoundry with Nginx, we're trying to get the X-Forwarded for header out in grails, but we can't seem to do so. It's either blank or the IP address of the Nginx server.
We often create sites where users are allowed to vote, and we want to be sure that they only vote once. Therefore, we'd like to use a combination of their network gateway (router) ip address and their X-Forwarded-For (internal) ip address so that we can check if people have already voted without having to block their entire network from voting because of one vote.
Unfortunately cookies have proven unreliable as users tend to use incogneto windows to make their votes. Using local storage has also proved unsuccessful as clients tend to delete their "website data" in order to vote again. The only other option is forcing them to create an account and verify their email address which is too much of a barrier to entry.
Is there a way that we can get a list of X-Forwarded for IP's in the chain (without Nginx stealing them), or is there a way we can create a service on Nginx that we can query to get the X-Forwarded-For header for the request, or can we create a "plugin" for Nginx to create a new header (X-Nginx-Forwarded-For)?