I have a Shared Flow that is used to log messages to a target.
This flow has to be called in Proxy Post Response flow.
I tried
proxy.url
client.host
request.header.host
But all these are giving the target endpoint values coz of the Proxy Post Response flow.
Can you please advise on how to get the incoming proxy hostname in the Proxy Post Response flow.
@dchiesa1
Solved! Go to Solution.
For sure one thing that will work is setting a new variable to preserve the original verb.
<AssignMessage name='AM-PreserveRequestHost'>
<AssignVariable>
<Name>original_host</Name>
<Ref>request.header.host</Value>
</AssignVariable>
</AssignMessage>
Set the policy in the proxy request flow. before the TargetEndpoint gets a chance to override the host.
There might be a better way but right now I don't know it.
can you try
proxyRequest.header.host ?
For sure one thing that will work is setting a new variable to preserve the original verb.
<AssignMessage name='AM-PreserveRequestHost'>
<AssignVariable>
<Name>original_host</Name>
<Ref>request.header.host</Value>
</AssignVariable>
</AssignMessage>
Set the policy in the proxy request flow. before the TargetEndpoint gets a chance to override the host.
There might be a better way but right now I don't know it.
Thanks @dchiesa1 !
I've thought of this as well, but it requires us to add another mandatory step in the Proxy Request Flow for the Shared Flow in the Response flow to work.
But if we have no other way out, let this be it.
As always, thanks a ton for the support!
I doubt if something exists today as you are in the response flow . Simple way is to preserve and use it.