We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 576d45b commit ac3d290Copy full SHA for ac3d290
index.js
@@ -18,7 +18,7 @@ app.get('/', async (req, res) => {
18
console.log("========USER AGENT=======")
19
console.log(req.headers["user-agent"])
20
21
- const ip = req.headers['x-forwarded-for']
+ const ip = req.headers['x-forwarded-for'].split(",")[0].trim()
22
const agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36';
23
24
const url = "https://api.ip8.com/ip/lookup/" + ip;
0 commit comments