How can service worker get the remote ip address of a request?
Asked
Active
Viewed 1,309 times
0
-
By "remote", you mean the server's one? – Bergi Jun 05 '16 at 10:35
-
yes,i want to get the server's ip of a request in user's browser – cson Jun 05 '16 at 10:59
-
Possible duplicate of [Accessing the web page's HTTP Headers in JavaScript](http://stackoverflow.com/questions/220231/accessing-the-web-pages-http-headers-in-javascript) – RIYAJ KHAN Jun 05 '16 at 11:52
1 Answers
0
Check this answer.
You have many services you can call and get your IP as response.
One example:
$.get("http://ipinfo.io", function(response) {
console.log(response.ip);
}, "jsonp");
-
But i want to know the ip of specific domain when the users request this domain in their browsers – cson Jun 05 '16 at 10:54
-