Hi, I'm developing a webpage that needs to interact with our internal Gateway. The Gateway, in turn, makes a request to an external REST API. The response from this external API contains a URL, and I need to redirect the user to this URL. The URL is only accessible if the request originates from our internal server IP, and not on the client side. How could I achieve that?
It does seems that we can't do Server-Side Redirection, it has to be in screen-flow and client side.
Since the URL is only accessible if the request originates from our internal server IP, one option is to set up a reverse proxy on your internal network. This proxy would route the call on behalf of users outside your network. For example, if the API returns a URL like `www.abc.com`, you can rewrite it as `www.reverse.com` (the reverse proxy). When accessed, the reverse proxy will handle the request to the original site and return the result to the user.
Using an Intermediate Server (Gateway or Proxy)
Since the URL should be accessed from your internal server, you can set up an intermediate redirection mechanism. The general idea is to make your internal Gateway handle the redirection behind the scenes on the server, while the client simply interacts with a neutral page or URL.
Here’s how you can achieve it:
Server-Side Processing in Gateway:
Return a Server-Accessible Link to the Client:
Thank you Kerollos & Siya.
We started cracking our brain. We can achieve 1. Sever-sde Processing in Gateway with a REST GET call, and then extract the content. That is not an issue.
As for 2. Return a Server-Accessible Link, how do we host the internal page? Do we just create a new screen with a empty container and I guess we have to load it with the content we've got from 1. ? And how do we handle the interaction in the content?
We thought of iframe, but iframe likely don't handle the interaction well.
Assume the URL returned by your API is "www.abc.com/app/test.aspx," which is only accessible from internal IP addresses. To make this work:
This ensures the client can access the URL, even though it's restricted to internal IPs, by routing through the reverse proxy.