express-pureip
v1.0.0
Published
Format IP V4 Addresses in express server running behind an IP V6 Local Network and exposed on IPV4 resulting in a mixed IP Address as output
Downloads
3
Maintainers
Readme
express-pureip
A middleware to get IP Address properly in mixed (IPV4 + IPV6) Network
Installation
npm install express-pureip
This will install express-pureip middleware in your project. You can also use other package manager as per your convinience.
Usage
app=express()
app.use(require("express-pureip"))
The above code will add clientIP variable in your request parameter. You can use it as a string in your project.
Example code below will return json shwoing IP Address to visitor
app.get("/",(req,res)=>{ res.json({"Your IP Address":req.clientIP})})