For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

JG's avatar
JG
Icon for Cumulonimbus rankCumulonimbus
Feb 03, 2014

LTM: Multiple headers for "Request Header Insert"

How do I insert more than one HTTP header for the field "Request Header Insert"?

 

3 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Jie,

     

    I don't think you can do this in the GUI. You'll need to have an iRule and use the "HTTP::header insert" command.

     

    HTH,

     

    N

     

  • If you have 11.4.0 or newer you could use LTM Policies to insert multiple HTTP headers via the GUI (or use iRules).

    From the GUI...

    Local Traffic->Policies->Policy List-> + (add)
    Give it a name and select "http" in the "requires" section and click "Finished".
    Add a rule to this policy..Call it something like "AddHeader".  
    Leave the conditions section empty but modify the Actions section with the following fields:
    target: http-header 
    event: request 
    action: insert 
    parameters: name yourhttpheadername 
                value yourhttpheadervalue
    Then add additional actions for each http header you want to insert..
    Once you finished creating the LTM policy, simply assign it to your virtual server under the "resources" tab.
    
  • Hello,

     

    If you want add multiples header I think you have to use HTTP::header insert. (doc:https://devcentral.f5.com/articles/manipulating-header-or-content-data)

     

    For other hand, I checked adding "\n" in command header insert : {code} header insert X-Forwarded-Proto: https\nHeader2: Value2" {code}