How can I access the users IP address from an onCall
Firebase function...
exports.MyFunction = functions.https.onCall((data, context) => {
var IPAddress; //???
console.log(IPAddress)
});
I saw that I might be able to get the IP address with context.rawRequest.connection.remoteAddress
but then I saw this post regarding an http
function, and I'm not sure how to set the headers on an onCall
function to fastly-client-ip
.
Any suggestions?