Skip to content

Commit

Permalink
repackage geoip without ipfs-http-client
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsartronic committed May 20, 2020
1 parent 43aba4b commit a44ae00
Show file tree
Hide file tree
Showing 3 changed files with 5,633 additions and 53,389 deletions.
5 changes: 4 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const HASH_TO_TEST = 'bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3
const SCRIPT_HASH = 'bafybeietzsezxbgeeyrmwicylb5tpvf7yutrm3bxrfaoulaituhbi7q6yi';
const HASH_STRING = 'Hello from IPFS Gateway Checker';

const ipfs_http_client = window.IpfsHttpClient({ host: 'ipfs.io' });


let checker = document.getElementById('checker');
checker.nodes = [];

Expand Down Expand Up @@ -212,7 +215,7 @@ let Flag = function(parent, hostname) {
}
}
if (ip) {
let geoipResponse = await geoip.lookup(ip);
let geoipResponse = await geoip.lookup(ip, ipfs_http_client);
if (geoipResponse && geoipResponse.country_code) {
this.onResponse(geoipResponse);
geoipResponse.time = Date.now();
Expand Down
Loading

0 comments on commit a44ae00

Please sign in to comment.