In a Spring or Restlet web application, how can I get the domain name of the client?
What I can do now is get client IP address only:
String clientIp = getRequest().getClientInfo().getAddress();
However I need to get the domain name of the client.
Mainly because I am making a proxy
app which domains from GoDaddy (for example)
:
- Forward
www CNAME
to theproxy
app. - Proxy app gets the domain name, say
xyz.com
, orabc.com
and forward it to a specific IP or another domain.