Forum Discussion

pingg_360569's avatar
pingg_360569
Icon for Nimbostratus rankNimbostratus
May 08, 2018

Irule (insert to header) does not work

Guys, I have F5 flow: service1 ---> F5 ---> service2 I would like to insert a special header (with SSL cert, but now I testing any simple irule). I created irule:

when HTTP_REQUEST {
HTTP::header insert test "test;"
}
I read headers in service2 servlet and print all. Unfrotunately there is no test header. What is more I have more and more Total Executions in irule statistic (so irule is run on requests). Have you got idea why I cant see header on service2 side?

2 Replies

  • There isn't anything wrong with the syntax you've specified, do you get any TCL errors in /var/log/ltm when you try to hit your virtual server?

     

  • Hello,

    Your syntax is correct:

    when HTTP_REQUEST {
    
    HTTP::header insert "f5header" "bigIP"
    log local0. "Logs: My header is send to backend server"
    
    }
    

    Please check the following point.

    • You set the irule to your VS (activing HTTP Profile and ssl decryption/interception if you use htts)

    Check logs in /var/lg/ltm that you pass trough your Irule (to see in realtime do a tailf /var/log/ltm | grep your-irule-name)

    • Use chrome plugin and inject an header from your browser (and check that you ca see it on your application).

    If you see nothing, you may not be looking at the application properly or there is another problem independent of F5...

    Regards