Skip to content

Commit

Permalink
Remove leeching code - identified leech as Google!
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpodcasts committed Mar 29, 2024
1 parent 4494e1f commit e0657ee
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export default {
}
let isLeech: boolean = false;

const object = await env.Data.get("leeches");
//const object = await env.Data.get("leeches");

if (object != null) {
var leeches: string[] = await object.json();
console.log(`ip-address: ${ipAddress} index: ${leeches.indexOf(ipAddress)} lookup: ${JSON.stringify(leeches)}`);
if (leeches.indexOf(ipAddress) >= 0) {
isLeech = true;
}
}
//if (object != null) {
// var leeches: string[] = await object.json();
// console.log(`ip-address: ${ipAddress} index: ${leeches.indexOf(ipAddress)} lookup: ${JSON.stringify(leeches)}`);
// if (leeches.indexOf(ipAddress) >= 0) {
// isLeech = true;
// }
//}

if (!isLeech) {
return request
Expand Down

0 comments on commit e0657ee

Please sign in to comment.