title: Obtain IP address in a Chrome Extension
body: <p>I would like to obtain the IP address of the user in a Chrome app. The Content Security Policy directive prevents me from using a service such as IPify, or an ajax request, such as: </p>
  
  <pre><code>$.ajax({
      url: 'https://freegeoip.net/json/',
      type: 'POST',
      dataType: 'jsonp',
      success: function(location) {
          alert(location.ip);
      }
  });
  </code></pre>
  
  <p>The error message is:</p>
  
  <p>Refused to load the script '<a href="https://freegeoip.net/json/?callback=jQuery21304975464364979416_1442806213407&amp;_=1442806213408" rel="nofollow">https://freegeoip.net/json/?callback=jQuery21304975464364979416_1442806213407&amp;_=1442806213408</a>' because it violates the following Content Security Policy directive: "default-src 'self' blob: filesystem: chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.</p>
  
  <p>Thanks,</p>
  
  <p>Edit for clarity: I am looking for the IP address as it is seen from a server on the global internet network, not the local IP.</p>