title: Firebase Function - Client IP always Internal to Google
body: <p>I am writing a Firebase Function, specifically for Dialogflow chatbot fulfillment. I am having trouble getting an accurate client IP address regardless of how I am testing it.</p>
  <p>I've seen on various posts the various ways to read client IP, but they are either <code>undefined</code> or an internal Google IP from one of their data centers.</p>
  <p>I've tried reading:</p>
  <pre><code>&quot;x-forwarded-for&quot; header
  req.connection.remoteAddress
  req.ip
  req.ips (collection of all of them, there is only ever 1 in the collection)
  </code></pre>
  <p>Any help would be much appreciated. I am trying to log analaytics around user interactions, and right now the IPs are all incorrect.</p>