Forum Discussion
Apm insert http header
Hi!
i need to insert some http header name and value to a web page. how do i do it ? i tried by irule and it's not working.(the irule is connected to the vs)
when i use fiddler to insert the http header it's working.
this is the irule
when ACCESS_POLICY_AGENT_EVENT { if { [ACCESS::policy agent_id] eq "irule_http_header" }{
set userIdentity [ACCESS::session data get "session.logon.last.username"] HTTP::header insert "case" $userIdentity log local0. " case mumber is $userIdentity " pool Pool_test } }
Thanks,
Aviv Hassidim
1 Reply
- Michael_Jenkins
Cirrostratus
Do you need to put the header in there on every request just certain ones?
The
event is used during login to APM when you have put an iRule event object in the flow through the VPE. If you're trying to put the header in every time a request is made, you'd do something like thisACCESS_POLICY_AGENT_EVENTThis would be for all requests when HTTP_REQUEST { This will check to make sure the user has successfully logged in if {[ACCESS::policy equals "allow"]} { HTTP::header insert "case" [ACCESS::session data get "session.logon.last.username"] log local0. "case mumber is [ACCESS::session data get "session.logon.last.username"]" pool Pool_test } }
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