Bill Tsagkas
Bill Tsagkas

Reputation: 539

Spring Boot App & React App Cannot Communicate Inside Openshift

I have deployed a single fat .jar, containing a Spring Boot app and a React app in Openshift. The Spring Boot app exposes a REST API, and the React app is the frontend that makes calls to that API.

Problem

Both apps are accessible externally just fine (with the url generated by Openshift), but the React app cannot communicate with the Spring Boot app through http://localhost:8080/... calls.

Attempts so Far

Is this a configuration issue? Do I need to set up routes? Or use something other than localhost/127.0.0.1?

Upvotes: 0

Views: 269

Answers (1)

Bill Tsagkas
Bill Tsagkas

Reputation: 539

To answer my own question, I finally managed to solve this by following Boris Chistov's suggestion. I simply removed all the http://localhost:8080 url parts and used relative URLs instead.

Upvotes: 1

Related Questions