I need to set an http header on the target (southbound) request.
Is there a callback event when the target request is about to occur?
I've been able to add the headers to the request, but this seems a little indirect.
Solved! Go to Solution.
The only callbacks are in the documentation here.
To set the target dynamically, you can use the following variables:
req.targetHostname = xx; req.targetPort = xx; req.targetPath = xx;
You can attach an Assign Message Policy on the Target Pre Flow to add an HTTP Header. The policy snippet would appear as follows:
<Add> <Headers> <Header name="static-header">static value</Header> <Header name="dynamic-header">{request.user.agent}</Header> </Headers> </Add>
The Value of the header can be fixed or dynamic (acquired from KVM, original request context) based on your use case.
Thanks @rmishra, but i was looking for a microgateway solution. I perhaps should have been clearer about that, other than posting this in the microgateway section.
I am going to pay more attention to tags/labels of a question going forward 🙂
Definitely missed the boat on that one
The only callbacks are in the documentation here.
To set the target dynamically, you can use the following variables:
req.targetHostname = xx; req.targetPort = xx; req.targetPath = xx;
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |