Forked from devdoshi/whatIsMyIp
Public
Express
1
2
3
4
5
6
7
8
export let whatIsMyIp = (req: express.Request, res: express.Response) => {
const xForwardedFor = req.get("x-forwarded-for");
const ip = req.get("True-Client-IP");
res.json({
ip,
xForwardedFor,
});
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!