HTTP request is not the same on Heroku and Google Cloud Run

I have a NodeJS/ExpressJS API that performs an HTTP request to get some JSON before sending a response. Here’s the snippet of code:

const ipApiUrl = `${ip}/json/`
const ipApiResponse = await axios.get(ipApiUrl)
ipCountryCode =

This code works fine locally. It also works fine on Heroku. However, it does NOT work the same on Google Cloud Run.

Here’s what should be:

    "ip": "",
    "city": "Toronto",
    "region": "Ontario",
    "region_code": "ON",
    "country": "CA",
    "country_code": "CA",

HOWEVER, when sending the request from Google Cloud Run the API I’m using returns something different. Instead I get this response:

{ ip: '', reserved: true }

I think this problem is with either Google Cloud Run or Docker because I also have issues with making HTTP requests to other sites, like

I am deploying to Google Cloud Run by using Docker. My Dockerfile is using node:10 and exposes the PORT environment variable like the documentation says. Everything else works fine except for this HTTP request. I’ve tried both axios and fetch.

Source: StackOverflow