mirror of
https://github.com/MrUnknownDE/utools.git
synced 2026-05-30 16:10:06 +02:00
add internal dual-stack check
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const { getCleanIp } = require('../utils');
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
const ip = getCleanIp(req.ip || req.socket.remoteAddress);
|
||||
res.json({ ip: ip || null });
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user