Skip to content

Commit

Permalink
testing bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sairaj-mote committed Jan 15, 2024
1 parent 75889dd commit ea72f31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routes/is-tor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const axios = require('axios');

router.get('/', async (req, res) => {
try {
const ip = req.headers['x-forwarded-for'] || req.get('X-Real-IP') || req.ip;
const ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress;
const response = await axios.get(`https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=${ip}`);
const isTor = response.data.includes(ip);
res.json({ isTor, ip });
Expand Down
2 changes: 1 addition & 1 deletion routes/is-tor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea72f31

Please sign in to comment.