0

I have a MFP 7.0 running with WAS Liberty Core. My hybird mobile app is accessing this context root, https://hostname:10080/AppName. I want to route or proxy an internal API which returns an image. The path is protected by Basic Authentication so I can only access it in the same port, 10080.

Ex. https://hostname:10080/AppName/ImageAPI/image/name_of_employee

Image API >> http://hostname:10002/InternalAPI/image/ I want to route it here when accessing the link above.

How do I configure this on WAS's server.xml?

Edit: Added a sample link to the image API service.

Norbs Knight
  • 169
  • 2
  • 10

1 Answers1

1

There is no configuration-only mechanism in Liberty to act as a reverse proxy to another origin server.

You'd need to create a resource via a servlet or webservices endpoint that makes an outbound HTTP request in some way or another and uses the response to fulfill the frontend request.

This could range from finding some open-source reverse proxy servlet or writing your own with a webservices client, apache httpclient, or even HTTPUrlConnection for a quick and dirty proof of concept.

covener
  • 17,402
  • 2
  • 31
  • 45