IP
Script
v1
Fork
1
2
3
4
5
6
// https://api.val.town/v1/express/zzz.IP
export
async
function
IP
(
req
,
res
)
{
const
ip
=
req
.
get
(
"true-client-ip"
)
??
req
.
get
(
"x-forwarded-for"
)
?.
split
(
","
)
[
0
]
;
res
.
send
(
ip
)
;
}