title: How to get client Host name of request in REST API
body: <p>Currently I am working with Rest API(Spring MVC). UI Part is developed in Angular JS. this project will integrate any of the domain.</p>
  
  <p>For example : <strong>www.xyz.com</strong> containing my register button
                <strong>www.abc.com</strong> also may contain my register button.</p>
  
  <p>When the request I received from user, I need to find out that, from which domain the request is coming?</p>
  
  <p>Tried with the following:</p>
  
  <pre><code>@GET
  @Path("/gethostname")
  @Produces("application/json")
  public void test(@Context HttpHeaders httpHeaders, @RequestBody JSONObject inputObj) {
      System.out.println("=========&gt; "+httpHeaders.getHeaderString("host"));
  }
  </code></pre>
  
  <p>But it return REST API(server) Host name. How can I get client host name?</p>