I need to see if a request is coming from a certain domain (www.domain.com).
So far, I only know how to get the IP address of the request (by using the request.getRemoteHost() method). The problem is that one domain might map to a lot of different IP addresses (for balance purposes), so I can not do something like this:
request.getRemoteHost().equals("200.50.40.30")
because there might be different IP address returned by the DNS when it resolves www.domain.com.
I want to be able to do something like this:
request.getRemoteHost().equals("www.domain.com")
But so far, I have no clue (and Google didn't help me) on how to do that.
Does somebody have any ideas??
Thank you in advance! :)