Skip to content

Commit

Permalink
remove all rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Jan 8, 2025
1 parent 79ce5fb commit 5fb95fb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ const server = http.createServer(async (req, res) => {
};
const ip = req.headers['x-forwarded-for'] ||
req.socket.remoteAddress;
console.log(ip)
if (ip && await limited(ip)) {
console.log('limited')
res.writeHead(429, headers);
} else {
console.log('unlimited')
// if (ip && await limited(ip)) {
// console.log('limited')
// res.writeHead(429, headers);
// } else {
res.writeHead(200, headers);
if (req.url === '/asset_prices') {
res.end(JSON.stringify(await getPrices()));
Expand All @@ -40,8 +38,7 @@ const server = http.createServer(async (req, res) => {
} else if (supplyAddress(req.url)) {
res.end(JSON.stringify(await getSupplyData(req.url)))
}
}
console.log('end')
// }

res.end();
});
Expand Down

0 comments on commit 5fb95fb

Please sign in to comment.