fix: send back user IP address, not website address
This commit is contained in:
parent
283866ce16
commit
323f6abf59
2
index.js
2
index.js
@ -22,7 +22,7 @@ app.get("/", function (req, res) {
|
|||||||
// your first API endpoint...
|
// your first API endpoint...
|
||||||
app.get("/api/whoami", (req, res) => {
|
app.get("/api/whoami", (req, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
ipaddress: req.headers.host,
|
ipaddress: req.ip,
|
||||||
language: req.headers["accept-language"],
|
language: req.headers["accept-language"],
|
||||||
software: req.headers["user-agent"],
|
software: req.headers["user-agent"],
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user