Frontend with tunnel can't redirect to local backend

Good morning,

We need to access a web server that redirects the client browser to a second service (Identity Server 4 IS4) on the same computer but with a different port.
We were able to reach the first web server but then the redirection fails, probably because the client is not able to resolve the IS4 service. It works without tunnel.

Is it possible using Cloudflare to create a tunnel that exposes both the services and allows the redirection of the client?

Do you have any suggestion?

Thanks in advance