Forum Discussion
ASM Support ID in HTTP Header
I have been trying to get an iRule to add into a HTTP header the support ID however for some reason in 11.6.0 HF4 I cannot get this to work. Reading other threads I would expect the following to work. The irule is as follows:
when HTTP_REQUEST_RELEASE {
HTTP::header insert X-ASM-SUPPORT-ID [ASM::support_id]
}
When I try and save the iRule it errors with: 01070151:3: Rule [/dmz/irule_asm_supportid] error: /dmz/irule_asm_supportid:2: error: [command is not valid in current event context (HTTP_REQUEST_RELEASE)][ASM::support_id]
Has anyone got any ideas?
James
2 Replies
- nathe
Cirrocumulus
James,
HTTP_REQUEST_RELEASE is not a valid Event for the command. See ASM__support_id
Valid events are ASM_REQUEST_DONE,ASM_REQUEST_VIOLATION,ASM_RESPONSE_VIOLATION
Hope this helps,
N
- beefy80
Nimbostratus
I have been working on this again recently as I had previously stopped working on it and found that the way I could get this working was to use the following iRule.
when HTTP_REQUEST_RELEASE { check if we have collected the support id ok and if so add the HTTP header if {[info exists x_asm_support_id]} { HTTP::header insert X-ASM-SUPPORT-ID $x_asm_support_id } } when ASM_REQUEST_DONE { Collect the Support ID and store it so we can add it to a HTTP header set x_asm_support_id [ASM::support_id] }
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