Forum Discussion

BaltoStar_12467's avatar
Aug 04, 2015

BIG-IP : http profile : insert multiple headers

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi

Via the web-admin, I can create/edit an

http profile
and set this field :

Request Header Insert = "X-Forwarded-Proto:http"

But what if I want to insert multiple headers ?

What is the syntax ?

Further, does

Request Header Insert
erase any pre-existing request headers ?

Also, I set

Insert X-Forwarded-For
to
Enabled
but logs do not show header
X-Forwarded-For
to be present.

8 Replies

    • Stan_Ward's avatar
      Stan_Ward
      Icon for Altocumulus rankAltocumulus

      This is an old question, but I noticed (v13.1.0.5) that the GUI help for Request Header Insert specifically says that multiple headers may be inserted, but does not indicate the syntax.

      "Type a string that the system inserts as a header in an HTTP request. If the header exists already, the system does not replace it. For multiple header insertions, both LTM Policies and iRules support inserting multiple headers into a request"

      I've tried separating by spaces (as is indicated for Allowed Headers) or \n , but only the last header is inserted correctly, i.e.:

      Header1:yes Header2:no
      

      comes out on a single line as:

      Header1 yes Header2=no
      
    • Stan_Ward's avatar
      Stan_Ward
      Icon for Altocumulus rankAltocumulus

      This is an old question, but I noticed (v13.1.0.5) that the GUI help for Request Header Insert specifically says that multiple headers may be inserted, but does not indicate the syntax.

      "Type a string that the system inserts as a header in an HTTP request. If the header exists already, the system does not replace it. For multiple header insertions, both LTM Policies and iRules support inserting multiple headers into a request"

      I've tried separating by spaces (as is indicated for Allowed Headers) or \n , but only the last header is inserted correctly, i.e.:

      Header1:yes Header2:no
      

      comes out on a single line as:

      Header1 yes Header2=no