pbojinov / request-ip

A Node.js module for retrieving a request's IP address on the server.
https://npmjs.com/package/request-ip
MIT License
828 stars 102 forks source link

IP is null, request to firebase emulator from within website iframe #50

Open citasionm opened 2 years ago

citasionm commented 2 years ago
const requestIp = require('request-ip');

exports.ipMiddleware = (req, res, next) => {
  req.clientIp = requestIp.getClientIp(req);
  next();
};

I have the above code and even when I am outputting in the console.log the req.clientIp it is null. This is through firebase running locally via an emulator. Ideas on why that may be?

The request is sent from within an iframe in a website.