Fix rdns
This commit is contained in:
parent
fb4c1fca36
commit
6960da6b45
2
app.js
2
app.js
@ -9,7 +9,7 @@ app.get('/', async (req, res) => {
|
|||||||
const ip = req.connection.remoteAddress
|
const ip = req.connection.remoteAddress
|
||||||
let host
|
let host
|
||||||
try {
|
try {
|
||||||
host = await r.reverse(ip)
|
host = await r.reverse(/.*:([^:]+)$/.exec(ip)[1])
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err.message)
|
console.log(err.message)
|
||||||
host = 'ERR'
|
host = 'ERR'
|
||||||
|
Loading…
Reference in New Issue
Block a user