I'm pulling my hair out with this one. Would appreciate a fresh set of eyes to see if I am doing anything wrong. For confidentiality reasons, I have had to change the names of the servers, but I have double-checked that everything matches in principle.
THIS WORKS FINE:
<HTTPTargetConnection> <Properties/> <SSLInfo> <Enabled>true</Enabled> </SSLInfo> <LoadBalancer> <Server name="MyTarget"/> </LoadBalancer> <Path>/test/backendapp</Path> </HTTPTargetConnection>
Where the Target Server config is:
{ "host": "mycompany.com", "isEnabled": true, "name": "MyTarget", "port": 443 }
But....
THIS DOESN'T WORK
<HTTPTargetConnection> <Properties/> <SSLInfo> <Enabled>true</Enabled> </SSLInfo> <LoadBalancer> <Server name="MyTarget"/> </LoadBalancer> <Path>/backendapp</Path> </HTTPTargetConnection>
Where the Target Server config is:
{ "host": "mycompany.com/test", "isEnabled": true, "name": "MyTarget", "port": 443 }
So basically, moving "/test" out of the Path and into the Target Server configuration causes the call to fail. I get a 503 with a "messaging.adaptors.http.flow.NoActiveTargets" error from the Target Request Flow.
The way that my company's reverse proxy is configured is out of my hands, the environmental switch is managed as part of the basepath, not as part of the server host name.
While I could just write off the error and continue with the first option which works, it's not sustainable long-term. It means developers would need to change the source code to promote the Proxy between environments, which would significantly impact our DevOps process.
at 2:54, suggests this is not the case.
Anyone see what I am missing?
Solved! Go to Solution.
Hi @John Ferguson, yes we can only use URL of backend service in Host.
In your first option, we can use dynamic value for env.
<HTTPTargetConnection> <Properties/> <LoadBalancer> <Server name="MyTarget"/> </LoadBalancer> <Path>/{env}/backendapp</Path> </HTTPTargetConnection>
So based on incoming request, the env can be changed.
or
Maybe we can use Multiple target endpoints with route rules.