title: Get the Domain that an Ajax Request is coming from
body: <p>I have a set of JSONP Web Service created on my J2EE application, which will be used by a website under a different domain. The web services have been created using the Jersey framework.</p>
  
  <p>What I want to know is, is there a way I can tell in my Web Service code, what domain the request came from?  What I'm hoping is that there is a value in the HttpHeader which would have this value.</p>
  
  <p>Also would it be possible for the user making the Ajax call, to fake this value, or to put in another value before they send the call?</p>
  
  <p>What I'm hoping to use this for is to restrict the domains that can call my web service.  I need to use JSONP, but i don't want my web service to be available to anybody who reverse engineers my JavaScript code. </p>
  
  <p>Or does anybody know another way of doing this?</p>