Forum Discussion
Irule header APM
Hello,
The fact that the EXAMPLE * header are eliminated by the F5 blocks any possibility of traceability of our messages within our information system for some VHOST.
I already set up irule to add some header but in this case I want the header is not reset.
Do you know an irule for that ?
Thanks in advance.
Regards,
9 Replies
- Nicolas_Destor
Cirrostratus
Hi,
Your question is not clear enough for me. Are you talking about the HTTP header? Can you provide an example of what you want to do ?
- Jean_Mamène
Cirrus
Hi Nicolas,
I would like the virtualhost https://test.com headers EXEMPLE* to be preserved :
EXEMPLE_TX_ID
EXEMPLE_SPAN_ID
EXEMPLE_PARENT_SPAN_ID
Regards,
- Jean_Mamène
Cirrus
up
Hi,
To make it more clear (your question) you want the BIG-IP not to make any changes to the EXAMPLE_TX_ID and EXAMPLE_SPAN_ID header?
Cheers,
Kees
- Jean_Mamène
Cirrus
Hi Kees,
That's right
Regards,
- Nicolas_Destor
Cirrostratus
Hi Jean,
My apologize for this late answer. Do you have an ASM profile attached to your vHost/VS? Because the default behavior of HTTP profile in LTM is to preserve client headers normally, your issue should not happen.
You can try this iRule otherwise (not tested):
when HTTP_REQUEST { set HEADER1 [HTTP::header "EXAMPLE_TX_ID"] set HEADER2 [HTTP::header "EXAMPLE_SPAN_ID"] } when HTTP_REQUEST_SEND { if [string length $HEADER1] { HTTP::header replace "EXAMPLE_TX_ID" $HEADER1 } if [string length $HEADER2] { HTTP::header replace "EXAMPLE_SPAN_ID" $HEADER2 } } To get the above irule to work with APM you need to add:
when CLIENT_ACCEPTED { ACCESS::restrict_irule_events disable }The APM has it's own HTTP server and bypasses the LTM HTTP server.
Cheers,
Kees
- Jean_Mamène
Cirrus
Thank you Nicolas & Kees for your return.
the http profil i'm use is http-xff. I adapted your irule to force the insertion of the header and it works.
when I try to apply the irule to the vhost with your code in addition i can't apply it : 01070394:3: ACCESS::restrict_irule_events in rule (/HorsProd/header_APM_test_horsprod) requires an associated ACCESS profile on the virtual server (/HorsProd/Example_VHOST_443)
Regards,
Hi Jean,
So your not using APM (as stated in your subject of this question)
But good to see you got it working in the end.
Cheers,
Kees
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
