Forum Discussion

BharatSharda's avatar
Icon for Altostratus rankAltostratus
Apr 08, 2021

Insert text to HTTP header via iRule event during APM execution

Hi Community Members, We are trying to insert some text to HTTP header through an iRule which will check for ACCESS_POLICY_AGENT_EVENT generated by via iRule event during an APM checking. Event "...
  • SanjayP's avatar
    Apr 14, 2021

    HTTP_REQUEST_SEND is also one of the event can be used to send the APM variable.

    so worth trying below. modify as needed.

        if { [ACCESS::policy agent_id] eq "event_1" } {
            ACCESS::session data set session.custom.header "value"
            set header [ACCESS::session data get "session.custom.header"]
     when HTTP_REQUEST_SEND  {    
        clientside {
        if {[info exists header]}{ 
    	HTTP::header insert "headername" $header
        } else {