When Target Servers are pure IP address (which would be the IP address of the target lb); what must be done to have apigee properly set the host header to the targetserver to be the request.header.host and NOT the IP Address? (and even if I use a DNS entry; I'd want the host to be the request.header.host and not the target.header.host)
Solved! Go to Solution.
The AM policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage continueOnError="false" enabled="true" name="AM-host">
<DisplayName>AM-host</DisplayName>
<Properties/>
<AssignVariable>
<Name>target.header.host</Name>
<Ref>request.header.host</Ref>
</AssignVariable>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>
The target flow XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
<PreFlow name="PreFlow">
<Request>
<Step>
<Name>AM-host</Name>
</Step>
</Request>
<Response/>
</PreFlow>
<Flows/>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<HTTPTargetConnection>
<URL>https://httpbin.org</URL>
</HTTPTargetConnection>
</TargetEndpoint>
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |