x-ip

Determine request client IP address

Usage no npm install needed!

<script type="module">
  import xIp from 'https://cdn.skypack.dev/x-ip';
</script>

README

A simple util to determine request client ip address. It could works well with all standard http.IncomingMessage and http.ServerResponse objects.

Installation

npm install x-ip

Usage

const getIp = require('x-ip')

module.exports = (req, res) => {
    res.end(getIp(req))
}