Search code examples
node.jsibm-cloudstrongloopapiconnect

IBM API Connect apps published to Bluemix inaccessible


I followed API Connect getting started guide to create a local loopback API app and tested successfully. Then I am trying to follow Publish Your API to Bluemix. The publishing is successful. The app is running. But clicking the app yields Chrome error:

This site can’t provide a secure connection
ddd.abbr-dev2.apic.mybluemix.net sent an invalid response.

I suspect the problem is incorrect port. According to CloudFoundry Nodejs tips, the port should use process.env.PORT, but loopback defaults to 3000. Following this clue, I tried adding config.local.js:

module.exports = {
  port: process.env.PORT
};

But the service end point is still inaccessible. Please Help. Thanks


Solution

  • This is actually by design. Since your API's implementation is on the public internet, it is secured via Mutual TLS. The only way to access it is via the API Connect gateway, thus ensuring the API is managed.

    If you want to make it accessible publicly, open the app in the Bluemix console and add an additional route to the app, using the mybluemix.net domain.