I'm trying to deploy a reactive application on a Google Cloud VM instance for which public IP cannot be enabled. The reactive app hits flask RESTful API endpoints based on user inputs.
Apps and parameters:
Problem: I tried hosting the flask app on the same VM instance, but the reactive app is unable to hit the API endpoints.
Working (local only): The (local) API endpoint is hit when the reactive app and flask app are run locally.
Not working:
Flask debugger did not record an API call. Unfortunately Chrome's network log does not track requests sent from the reactive app to RESTful API. Therefore, I'm unable to obtain more information on the request from the reactive app.
Is there a way to hit the RESTful API from the reactive app when both are deployed on a GCP VM instance? I can move the flask app to another VM instance, but public IP cannot be enabled and firewall rules cannot be modified.
Note: Not a duplicate of this question because public IP cannot be enabled.
@GagandeepT's answer will provide preliminary diagnostics to check if the host and port are correctly specified. I finally figured out the underlying issue - proxies were redirecting all the http and https traffic away even though the API call is technically 'local'.