Skip to content

Commit

Permalink
make calls to ipinfo https
Browse files Browse the repository at this point in the history
  • Loading branch information
goteamtim committed Apr 23, 2017
1 parent 0aa250a commit acdfb89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/mirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function checkTime(i) {
};

function getUsersIpInformation(){
$.getJSON('http://ipinfo.io', function(data){
$.getJSON('https://ipinfo.io', function(data){
userData["ip_info"] = data;
localStorage.setItem('userData',JSON.stringify(userData))
})
Expand Down
4 changes: 2 additions & 2 deletions js/setup.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var userData = JSON.parse(localStorage.getItem('userData')) || {};

function getUsersIpInformation(){
$.getJSON('http://ipinfo.io', function(data){
$.getJSON('https://ipinfo.io', function(data){
userData.location = data;
})
}

// function getUserLocation() {
// request('http://ipinfo.io', function(error, response, body) {
// request('https://ipinfo.io', function(error, response, body) {
// if (!error && response.statusCode == 200) {
// userData["ip_info"] = JSON.parse(body);
// } else {
Expand Down

0 comments on commit acdfb89

Please sign in to comment.