Forum Discussion
Arthur_7109
Nimbostratus
Jul 02, 2010Can we send the ASM Support ID to the web application in a Request Header?
Hi there,
We have a customer with ASM and LTM, and they would like to send the ASM Support ID to the web servers in the pool as an additional HTTP Request Header, so that it can be logged there.
In the ASM irules event ASM_REQUEST_VIOLATION, the support ID is a field in ASM::violation_data, however we'd need that data in an event like HTTP_REQUEST_SEND or so.
We haven't found a way to do this, has anyone done something like this?
Thanks,
Arthur
- hoolio
Cirrostratus
I think you should be able to do the header insert in ASM_REQUEST_VIOLATION itself:when ASM_REQUEST_VIOLATION { HTTP::header insert "ASM-SUPPORT-ID [lindex [ASM::violation_data] 1]" log local0. "$log_prefix: Inserted header ASM-SUPPORT-ID: [lindex [ASM::violation_data] 1]" }
- Arthur_7109
Nimbostratus
Yes that should work if a violation is triggered. - hoolio
Cirrostratus
Then this looks like it would work regardless of whether the request triggered a violation:when HTTP_REQUEST_SEND { log local0. "\[ASM::violation_data\]: [ASM::violation_data]" clientside { Insert a header in requests with the ASM Support ID HTTP::header insert ASM-SUPPORT-ID [lindex [ASM::violation_data] 1] log local0. "ASM-SUPPORT-ID: [HTTP::header ASM-SUPPORT-ID]" } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects